get.js revision 62e7a7d39cc0c6d25fec20964c26bc35b9fa116a
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * Provides a mechanism to fetch remote resources and
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * insert them into a document
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * @module get
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * Fetches and inserts one or more script or link nodes into the document
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @class Get
736745cee753d967cf5fb1063c21578ecca61b4aJeff ConniffY.Get = function() {
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * hash of queues to manage multiple requests
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @property queues
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * queue index used to generate transaction ids
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @property qidx
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * node index used to generate unique node ids
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @property nidx
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff // sandboxFrame=null,
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * interal property used to prevent multiple simultaneous purge
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @property purging
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @type boolean
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * Generates an HTML element, this is not appended to a document
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @method _node
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @param type {string} the type of element
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @param attr {string} the attributes
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @param win {Window} optional window to create the element in
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @return {HTMLElement} the generated node
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff var w = win || Y.config.win, d=w.document, n=d.createElement(type);
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff for (var i in attr) {
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * Generates a link node
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @method _linkNode
04f7ef259d54aeab53258697e1e7f8856adcc8a6Jeff Conniff * @param url {string} the url for the css file
04f7ef259d54aeab53258697e1e7f8856adcc8a6Jeff Conniff * @param win {Window} optional window to create the node in
04f7ef259d54aeab53258697e1e7f8856adcc8a6Jeff Conniff * @return {HTMLElement} the generated node
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff "charset": c,
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * Generates a script node
7928e2ef0532df9064d9374ceda31d6ab080eb2dJeff Conniff * @method _scriptNode
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @param url {string} the url for the script file
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @param win {Window} optional window to create the node in
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @return {HTMLElement} the generated node
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff var _scriptNode = function(url, win, charset) {
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff "charset": c,
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * The request failed, execute fail handler with whatever
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * was accomplished. There isn't a failure case at the
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * moment unless you count aborted transactions
7928e2ef0532df9064d9374ceda31d6ab080eb2dJeff Conniff * @method _fail
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @param id {string} the id of the request
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff // execute failure callback
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff n = (L.isString(nId)) ? q.win.document.getElementById(nId) : nId;
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * Removes the nodes for the specified queue
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @method _purge
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * Returns the data payload for callback functions
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @method _returnData
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff purge: function() {
44c68f247b9311ea767cb4656220793317e3383bJeff Conniff * The request is complete, so executing the requester's callback
44c68f247b9311ea767cb4656220793317e3383bJeff Conniff * @method _finish
44c68f247b9311ea767cb4656220793317e3383bJeff Conniff * @param id {string} the id of the request
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff var msg = "transaction " + id + " was aborted";
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // execute success callback
44c68f247b9311ea767cb4656220793317e3383bJeff Conniff * Timeout detected
44c68f247b9311ea767cb4656220793317e3383bJeff Conniff * @method _timeout
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @param id {string} the id of the request
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * Loads the next item for a given request
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @method _next
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @param id {string} the id of the request
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @param loaded {string} the url that was just loaded, if any
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff Y.log("_next: " + id + ", loaded: " + loaded, "info", "Get");
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff // Y.log('cancel timer');
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff var msg = "transaction " + id + " was aborted";
2353184083624510261e335c156a05e8cae2fc41Jeff Conniff // This is the first pass: make sure the url is an array
2353184083624510261e335c156a05e8cae2fc41Jeff Conniff q.varName = (L.isString(q.varName)) ? [q.varName] : q.varName;
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff var w=q.win, d=w.document, h=d.getElementsByTagName("head")[0], n;
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff Y.log("attempting to load " + url, "info", "Get");
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // Y.log('create timer');
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // track this node's load progress
aa1805d3af3a9ac854fadba9707e18ee5f006804Jeff Conniff // add the node to the queue so we can return it to the user supplied callback
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // add it to the head or insert it before 'insertBefore'
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff Y.log("Appending node: " + url, "info", "Get");
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // FireFox does not support the onload event for link nodes, so there is
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // no way to make the css requests synchronous. This means that the css
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // rules in multiple files could be applied out of order in this browser
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // if a later request returns before an earlier one. Safari too.
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff if ((ua.webkit || ua.gecko) && q.type === "css") {
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * Removes processed queues and corresponding nodes
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @method _autoPurge
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff var _autoPurge = function() {
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff for (var i in queues) {
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * Saves the state for the request and begins loading
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * the requested urls
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @method queue
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @param type {string} the type of node to insert
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @param url {string} the url to load
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @param opts the hash of options for this request
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff q.autopurge = ("autopurge" in q) ? q.autopurge :
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * Detects when a node has been loaded. In the case of
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * script nodes, this does not guarantee that contained
2353184083624510261e335c156a05e8cae2fc41Jeff Conniff * script is ready to use.
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @method _track
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * @param type {string} the type of node to track
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * @param n {HTMLElement} the node to track
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @param id {string} the id of the request
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff * @param url {string} the url that is being loaded
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff * @param win {Window} the targeted window
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff * @param qlength the number of remaining items in the queue,
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff * including this one
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff * @param trackfn {Function} function to execute when finished
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff * the default is _next
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff var _track = function(type, n, id, url, win, qlength, trackfn) {
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff // IE supports the readystatechange event for script and css nodes
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff n.onreadystatechange = function() {
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff // webkit prior to 3.x is no longer supported
e81cc12bafc201061ba76fdfd173f1412371e0ecJeff Conniff // Safari 3.x supports the load event for script nodes (DOM2)
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff Y.log(id + " DOM2 onload " + url, "info", "Get");
f47f024e093853ad3957be898687fc8317a835daJeff Conniff // FireFox and Opera support onload (but not DOM2 in FF) handlers for
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff // script nodes. Opera, but not FF, supports the onload event for link
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff n.onload = function() {
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * The number of request required before an automatic purge.
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * property PURGE_THRESH
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @default 20
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * Called by the the helper for detecting script load in Safari
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @method _finalize
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @param id {string} the transaction id
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * Abort a transaction
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @method abort
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @param {string|object} either the tId or the object returned from
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * script() or css()
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff abort: function(o) {
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * Fetches and inserts one or more script nodes into the head
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * of the current document or the document in a specified window.
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @method script
f47f024e093853ad3957be898687fc8317a835daJeff Conniff * @param url {string|string[]} the url or urls to the script(s)
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @param opts {object} Options:
7defd8450188bddcb9e79a7d1c2246aa027ed78fJeff Conniff * <dt>onSuccess</dt>
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * callback to execute when the script(s) are finished loading
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * The callback receives an object back with the following
dcb17c0ed0cc508b4c74234b7477b05e6a8723ebJeff Conniff * <dt>win</dt>
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * <dd>the window the script(s) were inserted into</dd>
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * <dt>data</dt>
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * <dd>the data object passed in when the request was made</dd>
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * <dt>nodes</dt>
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * <dd>An array containing references to the nodes that were
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * inserted</dd>
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * <dt>purge</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dd>A function that, when executed, will remove the nodes
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff * that were inserted</dd>
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * <dt>onTimeout</dt>
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * callback to execute when a timeout occurs.
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * The callback receives an object back with the following
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * <dt>win</dt>
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * <dd>the window the script(s) were inserted into</dd>
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * <dt>data</dt>
82cdeb4d776987d0e2501978b1e1c50143931bbcJeff Conniff * <dd>the data object passed in when the request was made</dd>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dt>nodes</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dd>An array containing references to the nodes that were
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * inserted</dd>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dt>purge</dt>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dd>A function that, when executed, will remove the nodes
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * that were inserted</dd>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dt>onFailure</dt>
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * callback to execute when the script load operation fails
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * The callback receives an object back with the following
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dt>win</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dd>the window the script(s) were inserted into</dd>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dt>data</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dd>the data object passed in when the request was made</dd>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dt>nodes</dt>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dd>An array containing references to the nodes that were
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * inserted successfully</dd>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dt>purge</dt>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dd>A function that, when executed, will remove any nodes
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * that were inserted</dd>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dt>context</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dd>the execution context for the callbacks</dd>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dt>win</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * <dd>a window other than the one the utility occupies</dd>
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dt>autopurge</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * setting to true will let the utilities cleanup routine purge
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * the script once loaded
24ef71067b8f34f90df1fc636a73424647c97f4bJeff Conniff * <dt>data</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * data that is supplied to the callback when the script(s) are
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dt>insertBefore</dt>
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dd>node or node id that will become the new node's nextSibling</dd>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dt>charset</dt>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dd>Node charset, default utf-8</dd>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * <dt>timeout</dt>
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dd>Number of milliseconds to wait before aborting and firing the timeout event</dd>
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * Y.Get.script(
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * ["http://yui.yahooapis.com/2.3.1/build/dragdrop/dragdrop-min.js",
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * "http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"], {
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * onSuccess: function(o) {
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * console.log(o.data); // foo
7928e2ef0532df9064d9374ceda31d6ab080eb2dJeff Conniff * new Y.DDProxy("dd1"); // also new o.reference("dd1"); would work
7928e2ef0532df9064d9374ceda31d6ab080eb2dJeff Conniff * this.log("won't cause error because Y is the context");
7defd8450188bddcb9e79a7d1c2246aa027ed78fJeff Conniff * this.log(o.nodes.length === 2) // true
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * // o.purge(); // optionally remove the script nodes immediately
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * },
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * onFailure: function(o) {
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * console.log("transaction failed");
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * },
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * data: "foo",
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * context: Y,
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * // win: otherframe // target another window/frame
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * autopurge: true // allow the utility to choose when to remove the nodes
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * });
736745cee753d967cf5fb1063c21578ecca61b4aJeff Conniff * @return {tId: string} an object containing info about the transaction
11b81e1c54469a27a52271a2bcff20794d259d27Jeff Conniff * Fetches and inserts one or more css link nodes into the
11b81e1c54469a27a52271a2bcff20794d259d27Jeff Conniff * head of the current document or the document in a specified
11b81e1c54469a27a52271a2bcff20794d259d27Jeff Conniff * @method css
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * @param url {string} the url or urls to the css file(s)
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * @param opts Options:
11b81e1c54469a27a52271a2bcff20794d259d27Jeff Conniff * <dt>onSuccess</dt>
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff * callback to execute when the css file(s) are finished loading
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * The callback receives an object back with the following
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dl>win</dl>
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dd>the window the link nodes(s) were inserted into</dd>
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dt>data</dt>
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dd>the data object passed in when the request was made</dd>
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * <dt>nodes</dt>
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * <dd>An array containing references to the nodes that were
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * inserted</dd>
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * <dt>purge</dt>
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * <dd>A function that, when executed, will remove the nodes
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * that were inserted</dd>
624b3d25f12c6e63f607b2690315293ad7ef6481Jeff Conniff * <dt>context</dt>
dcb17c0ed0cc508b4c74234b7477b05e6a8723ebJeff Conniff * <dd>the execution context for the callbacks</dd>
dcb17c0ed0cc508b4c74234b7477b05e6a8723ebJeff Conniff * <dt>win</dt>
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * <dd>a window other than the one the utility occupies</dd>
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff * <dt>data</dt>
7928e2ef0532df9064d9374ceda31d6ab080eb2dJeff Conniff * data that is supplied to the callbacks when the nodes(s) are
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * <dt>insertBefore</dt>
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * <dd>node or node id that will become the new node's nextSibling</dd>
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * <dt>charset</dt>
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * <dd>Node charset, default utf-8</dd>
7928e2ef0532df9064d9374ceda31d6ab080eb2dJeff Conniff * Y.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * Y.Get.css(["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff * "http://yui.yahooapis.com/2.3.1/build/logger/assets/skins/sam/logger.css"]);
11b81e1c54469a27a52271a2bcff20794d259d27Jeff Conniff * @return {tId: string} an object containing info about the transaction
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff}, "@VERSION@");