From 1354d17270961fff662d40f90521223f8fd0d73b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Aug 2012 18:59:10 +0400 Subject: update dojo to 1.7.3 --- lib/dojo/io/iframe.js.uncompressed.js | 376 ++++++++++++++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 lib/dojo/io/iframe.js.uncompressed.js (limited to 'lib/dojo/io/iframe.js.uncompressed.js') diff --git a/lib/dojo/io/iframe.js.uncompressed.js b/lib/dojo/io/iframe.js.uncompressed.js new file mode 100644 index 000000000..9ac948278 --- /dev/null +++ b/lib/dojo/io/iframe.js.uncompressed.js @@ -0,0 +1,376 @@ +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( + '