define("dojo/io/iframe", ["../main", "require"], function(dojo, require) { // module: // dojo/io/iframe // summary: // TODOC dojo.getObject("io", true, dojo); /*===== dojo.declare("dojo.io.iframe.__ioArgs", dojo.__IoArgs, { constructor: function(){ // summary: // All the properties described in the dojo.__ioArgs type, apply // to this type. The following additional properties are allowed // for dojo.io.iframe.send(): // method: String? // The HTTP method to use. "GET" or "POST" are the only supported // values. It will try to read the value from the form node's // method, then try this argument. If neither one exists, then it // defaults to POST. // handleAs: String? // Specifies what format the result data should be given to the // load/handle callback. Valid values are: text, html, xml, json, // javascript. IMPORTANT: For all values EXCEPT html and xml, The // server response should be an HTML file with a textarea element. // The response data should be inside the textarea element. Using an // HTML document the only reliable, cross-browser way this // transport can know when the response has loaded. For the html // handleAs value, just return a normal HTML document. NOTE: xml // is now supported with this transport (as of 1.1+); a known issue // is if the XML document in question is malformed, Internet Explorer // will throw an uncatchable error. // content: Object? // If "form" is one of the other args properties, then the content // object properties become hidden form form elements. For // instance, a content object of {name1 : "value1"} is converted // to a hidden form element with a name of "name1" and a value of // "value1". If there is not a "form" property, then the content // object is converted into a name=value&name=value string, by // using dojo.objectToQuery(). this.method = method; this.handleAs = handleAs; this.content = content; } }); =====*/ dojo.io.iframe = { // summary: // Sends an Ajax I/O call using and Iframe (for instance, to upload files) create: function(/*String*/fname, /*String*/onloadstr, /*String?*/uri){ // summary: // Creates a hidden iframe in the page. Used mostly for IO // transports. You do not need to call this to start a // dojo.io.iframe request. Just call send(). // fname: String // The name of the iframe. Used for the name attribute on the // iframe. // onloadstr: String // A string of JavaScript that will be executed when the content // in the iframe loads. // uri: String // The value of the src attribute on the iframe element. If a // value is not given, then dojo/resources/blank.html will be // used. if(window[fname]){ return window[fname]; } if(window.frames[fname]){ return window.frames[fname]; } var turi = uri; if(!turi){ if(dojo.config["useXDomain"] && !dojo.config["dojoBlankHtmlUrl"]){ console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds," + " please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl" + " to the path on your domain to blank.html"); } turi = (dojo.config["dojoBlankHtmlUrl"]||require.toUrl("../resources/blank.html")); } var cframe = dojo.place( '