Namespacedojo.io.script

dojo.require("dojo.io.script");
defined in dojo/io/script.js

Jump to PropertiesJump to FunctionsConstructorsBack to top

generic handler for jsonp callback. A pointer to this function is used for all jsonp callbacks. NOTE: the "this" in this function will be the Deferred object that represents the script request.

Jump to PropertiesJump to ConstructorsFunctionsBack to top

Functiondojo.io.script.attach(id: String, url: String, frameDocument: Document?)
creates a new <script> tag pointing to the specified URL and adds it to the document.
sends a get request using a dynamically created script tag.
removes the script element with the given id.
canceller function for dojo._ioSetArgs call.
errHandler function for dojo._ioSetArgs call.
okHandler function for dojo._ioSetArgs call.
inflight check function to see if IO finished.
sets up a Deferred object for an IO request.
inflight function to handle a completed response.
inflight check function to see if dfd is still valid.
All the properties described in the dojo.__ioArgs type, apply to this type as well, EXCEPT "handleAs". It is not applicable to dojo.io.script.get() calls, since it is implied by the usage of "callbackParamName" (response will be a JSONP call returning JSON) or "checkString" (response is pure JavaScript defined in the body of the script that was attached). The following additional properties are allowed for dojo.io.script.get(): callbackParamName: String The URL parameter name that indicates the JSONP callback string. For instance, when using Yahoo JSONP calls it is normally, callbackParamName: "callback". For AOL JSONP calls it is normally callbackParamName: "c". checkString: String A string of JavaScript that when evaluated like so: "typeof(" + checkString + ") != 'undefined'" being true means that the script fetched has been loaded. Do not use this if doing a JSONP type of call (use callbackParamName instead). frameDoc: Document. The Document object for a child iframe. If this is passed in, the script will be attached to that document. This can be helpful in some comet long-polling scenarios with Firefox and Opera.

Jump to FunctionsJump to ConstructorsPropertiesBack to top