* onSuccess
*
* callback to execute when the script(s) are finished loading
* The callback receives an object back with the following
* data:
*
* - win
* - the window the script(s) were inserted into
* - data
* - the data object passed in when the request was made
* - nodes
* - An array containing references to the nodes that were
* inserted
* - purge
* - A function that, when executed, will remove the nodes
* that were inserted
* -
*
*
* onFailure
*
* callback to execute when the script load operation fails
* The callback receives an object back with the following
* data:
*
* - win
* - the window the script(s) were inserted into
* - data
* - the data object passed in when the request was made
* - nodes
* - An array containing references to the nodes that were
* inserted successfully
* - purge
* - A function that, when executed, will remove any nodes
* that were inserted
* -
*
*
* onTimeout
*
* callback to execute when a timeout occurs.
* The callback receives an object back with the following
* data:
*
* - win
* - the window the script(s) were inserted into
* - data
* - the data object passed in when the request was made
* - nodes
* - An array containing references to the nodes that were
* inserted
* - purge
* - A function that, when executed, will remove the nodes
* that were inserted
* -
*
*
* scope
* the execution context for the callbacks
* win
* a window other than the one the utility occupies
* autopurge
*
* setting to true will let the utilities cleanup routine purge
* the script once loaded
*
* data
*
* data that is supplied to the callback when the script(s) are
* loaded.
*
* varName
*
* variable that should be available when a script is finished
* loading. Used to help Safari 2.x and below with script load
* detection. The type of this property should match what was
* passed into the url parameter: if loading a single url, a
* string can be supplied. If loading multiple scripts, you
* must supply an array that contains the variable name for
* each script.
*
* insertBefore
* node or node id that will become the new node's nextSibling
*
* charset
* Node charset, deprecated, use 'attributes'
* attributes
* A hash of attributes to apply to dynamic nodes.
* timeout
* Number of milliseconds to wait before aborting and firing the timeout event
*
* // assumes yahoo, dom, and event are already on the page
* YAHOO.util.Get.script(
* ["http://yui.yahooapis.com/2.7.0/build/dragdrop/dragdrop-min.js",
* "http://yui.yahooapis.com/2.7.0/build/animation/animation-min.js"], {
* onSuccess: function(o) {
* YAHOO.log(o.data); // foo
* new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
* this.log("won't cause error because YAHOO is the scope");
* this.log(o.nodes.length === 2) // true
* // o.purge(); // optionally remove the script nodes immediately
* },
* onFailure: function(o) {
* YAHOO.log("transaction failed");
* },
* data: "foo",
* timeout: 10000, // 10 second timeout
* scope: YAHOO,
* // win: otherframe // target another window/frame
* autopurge: true // allow the utility to choose when to remove the nodes
* });
*
* @return {tId: string} an object containing info about the transaction
*/
script: function(url, opts) { return _queue("script", url, opts); },
/**
* Fetches and inserts one or more css link nodes into the
* head of the current document or the document in a specified
* window.
* @method css
* @static
* @param url {string} the url or urls to the css file(s)
* @param opts Options:
*
* - onSuccess
* -
* callback to execute when the css file(s) are finished loading
* The callback receives an object back with the following
* data:
*
win
* - the window the link nodes(s) were inserted into
* - data
* - the data object passed in when the request was made
* - nodes
* - An array containing references to the nodes that were
* inserted
* - purge
* - A function that, when executed, will remove the nodes
* that were inserted
* -
*
*
* scope
* the execution context for the callbacks
* win
* a window other than the one the utility occupies
* data
*
* data that is supplied to the callbacks when the nodes(s) are
* loaded.
*
* insertBefore
* node or node id that will become the new node's nextSibling
* charset
* Node charset, deprecated, use 'attributes'
* attributes
* A hash of attributes to apply to dynamic nodes.
*
*
* YAHOO.util.Get.css("http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css");
*
*
* YAHOO.util.Get.css(["http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css",
* "http://yui.yahooapis.com/2.7.0/build/logger/assets/skins/sam/logger.css"]);
*
* @return {tId: string} an object containing info about the transaction
*/
css: function(url, opts) {
return _queue("css", url, opts);
}
};
}();
YAHOO.register("get", YAHOO.util.Get, {version: "2.9.0", build: "2800"});
}, '2.9.0' ,{"requires": ["yui2-yahoo"]});