node-debug.js revision 9fca169e8847cdfcd3016985a4f01b5ee3c89f40
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * The Node Utility provides a DOM-like interface for interacting with DOM nodes.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @module node
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @submodule node-base
78f327ee942771169c65c91baf789fd10e72b01avboxsync * The Node class provides a wrapper for manipulating DOM Nodes.
78f327ee942771169c65c91baf789fd10e72b01avboxsync * Node properties can be accessed via the set/get methods.
78f327ee942771169c65c91baf789fd10e72b01avboxsync * Use Y.get() to retrieve Node instances.
78f327ee942771169c65c91baf789fd10e72b01avboxsync * <strong>NOTE:</strong> Node properties are accessed using
78f327ee942771169c65c91baf789fd10e72b01avboxsync * the <code>set</code> and <code>get</code> methods.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @class Node
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @constructor
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @for Node
131561c23ec73ceb3818b6df9ff32729642907dbvboxsync// "globals"
0912cf29d2641459d225c40114c567a63273746cvboxsync if (!this[UID]) { // stamp failed; likely IE non-HTMLElement
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync // used with previous/next/ancestor tests
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync var ret = null;
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync function(n) {
0912cf29d2641459d225c40114c567a63273746cvboxsync function(n) {
0912cf29d2641459d225c40114c567a63273746cvboxsync// end "globals"
e139144ef4fc5f2bbe26be64faf2737cd8ccf413vboxsync// Add custom event adaptors to this list. This will make it so
e139144ef4fc5f2bbe26be64faf2737cd8ccf413vboxsync// that delegate, key, available, contentready, etc all will
0912cf29d2641459d225c40114c567a63273746cvboxsync// be available through Node.on
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Registers plugins to be instantiated at the class level (plugins
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * which should be plugged into every instance of Node by default).
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method Node.plug
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined)
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin
c16bfd344d242a6352ec72b4478099ccadfc5a70vboxsync * Unregisters any class level plugins which have been registered by the Node
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method Node.unplug
c16bfd344d242a6352ec72b4478099ccadfc5a70vboxsync * @param {Function | Array} plugin The plugin class, or an array of plugin classes
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Retrieves the DOM node bound to a Node instance
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method Node.getDOMNode
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Y.Node || HTMLNode} node The Node instance or an HTMLNode
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @return {HTMLNode} The DOM node bound to the Node instance. If a DOM node is passed
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * as the node argument, it is simply returned.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync } else if (!node[NODE_NAME] || Y.DOM.isWindow(node)) { // must already be a DOMNode
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync return node || null;
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync if (typeof val === 'object' || typeof val === 'function') { // safari nodeList === function
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync if (NODE_TYPE in val || Y.DOM.isWindow(val)) {// node || window
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync if (g_restrict[node[UID]] && !node.contains(val)) {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync val = null; // not allowed to go outside of root node
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync } else if (val.item || // dom collection or Node instance // TODO: check each node for restrict? block ancestor?
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync (val[0] && val[0][NODE_TYPE])) { // array of DOM Nodes
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync for (var i in val) { // TODO: test this and pull hasOwnProperty check if safe?
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync ret = Node.scrubVal(fn.apply(context, args), this);
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync Y.log('unable to add method: ' + name, 'warn', 'Node');
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Returns a single Node instance bound to the node or the
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * first element matching the given selector.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method Y.get
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {String | HTMLElement} node a node or Selector
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Boolean} restrict Whether or not the Node instance should be restricted to accessing
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * its subtree only.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync if (node.indexOf('doc') === 0) { // doc OR document
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync } else if (node.indexOf('win') === 0) { // doc OR document
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync instance = Node._instances[node[UID]]; // reuse exising instances
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync } else if (restrict) {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync // TODO: restrict on subsequent call?
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Creates a new dom node using the provided markup string.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method create
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {String} html The markup used to create the element
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {HTMLDocument} doc An optional document context
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync return Node.get(Y.DOM.create.apply(Y.DOM, arguments));
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Allows for getting and setting the text of an element.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Formatting is preserved and special characters are treated literally.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @config text
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @type String
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync getter: function() {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync 'options': {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync getter: function() {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Returns a NodeList instance of all HTMLElement children.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @readOnly
2c872d5e527386b5202fb36f281a391aecd82c5fvboxsync * @config children
2c872d5e527386b5202fb36f281a391aecd82c5fvboxsync * @type NodeList
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync 'children': {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync getter: function() {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync for (i = 0, len = childNodes.length; i < len; ++i) {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync getter: function() {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync getter: function(attr) {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync return Y.DOM.getStyle(g_nodes[this[UID]].style, attr);
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync// call with instance context
0912cf29d2641459d225c40114c567a63273746cvboxsync } else if (node[name] !== undefined) { // only set DOM attributes
0912cf29d2641459d225c40114c567a63273746cvboxsync// call with instance context
0912cf29d2641459d225c40114c567a63273746cvboxsync _getClasses: function() {
0912cf29d2641459d225c40114c567a63273746cvboxsync toString: function() {
0912cf29d2641459d225c40114c567a63273746cvboxsync // TODO: add yuid?
0912cf29d2641459d225c40114c567a63273746cvboxsync val = Y.Node.getDOMNode(this).getAttribute(attr, 2);
0912cf29d2641459d225c40114c567a63273746cvboxsync return this;
0912cf29d2641459d225c40114c567a63273746cvboxsync * Creates a new Node using the provided markup string.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @method create
0912cf29d2641459d225c40114c567a63273746cvboxsync * @param {String} html The markup used to create the element
0912cf29d2641459d225c40114c567a63273746cvboxsync * @param {HTMLDocument} doc An optional document context
0912cf29d2641459d225c40114c567a63273746cvboxsync * Compares nodes to determine if they match.
0912cf29d2641459d225c40114c567a63273746cvboxsync * Node instances can be compared to each other and/or HTMLElements.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @method compareTo
0912cf29d2641459d225c40114c567a63273746cvboxsync * @param {HTMLElement | Node} refNode The reference node to compare to the node.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @return {Boolean} True if the nodes match, false if they do not.
0912cf29d2641459d225c40114c567a63273746cvboxsync * Determines whether the node is appended to the document.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @method inDoc
0912cf29d2641459d225c40114c567a63273746cvboxsync * @param {Node|HTMLElement} doc optional An optional document to check against.
0912cf29d2641459d225c40114c567a63273746cvboxsync * Defaults to current document.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @return {Boolean} Whether or not this node is appended to the document.
0912cf29d2641459d225c40114c567a63273746cvboxsync doc = (doc) ? Node.getDOMNode(doc) : node[OWNER_DOCUMENT];
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * Returns the nearest ancestor that passes the test applied by supplied boolean method.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method ancestor
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * @param {String | Function} fn A selector or boolean method for testing elements.
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * If a function is used, it receives the current node being tested as the only argument.
329081e295d2a28a39899b3f919f3c65eef227f0vboxsync * @return {Node} The matching Node instance or null if not found
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync return Node.get(Y.DOM.elementByAxis(g_nodes[this[UID]], 'parentNode', _wrapFn(fn)));
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * Returns the previous matching sibling.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Returns the nearest element node sibling if no method provided.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method previous
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {String | Function} fn A selector or boolean method for testing elements.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * If a function is used, it receives the current node being tested as the only argument.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @return {Node} Node instance or null if not found
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync return Node.get(Y.DOM.elementByAxis(g_nodes[this[UID]], 'previousSibling', _wrapFn(fn), all));
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * Returns the next matching sibling.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Returns the nearest element node sibling if no method provided.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method next
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {String | Function} fn A selector or boolean method for testing elements.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * If a function is used, it receives the current node being tested as the only argument.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @return {Node} Node instance or null if not found
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync return Node.get(Y.DOM.elementByAxis(g_nodes[this[UID]], 'nextSibling', _wrapFn(fn), all));
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Retrieves a Node instance of nodes based on the given CSS selector.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method query
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {string} selector The CSS selector to test against.
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * @return {Node} A Node instance for the matching HTMLElement.
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync return Y.get(Y.Selector.query(selector, g_nodes[this[UID]], true));
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Retrieves a nodeList based on the given CSS selector.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method queryAll
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {string} selector The CSS selector to test against.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array.
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync return Y.all(Y.Selector.query(selector, g_nodes[this[UID]]));
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync // TODO: allow fn test
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Test if the supplied node matches the supplied selector.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method test
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {string} selector The CSS selector to test against.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @return {boolean} Whether or not the node matches the selector.
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync return Y.Selector.test(g_nodes[this[UID]], selector);
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync * Removes the node from its parent.
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync * Shortcut for myNode.get('parentNode').removeChild(myNode);
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync * @method remove
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync * @chainable
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync remove: function() {
61d7d9128a38eb86895d38f1ad95bdf44fc0b240vboxsync return this;
6bbb64124ce2aa00c7f97c8c32b9607e6226b043vboxsync * Invokes a method on the Node instance
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method invoke
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {String} method The name of the method to invoke
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Any} a, b, c, etc. Arguments to invoke the method with.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @return Whatever the underly method returns.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * DOM Nodes and Collections return values
2c872d5e527386b5202fb36f281a391aecd82c5fvboxsync * are converted to Node/NodeList instances.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync if (a && a instanceof Y.Node) {
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync if (b && b instanceof Y.Node) {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync destructor: function() {
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync // TODO: What about shared instances?
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync //var uid = this[UID];
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync //delete g_nodes[uid];
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync //delete g_restrict[uid];
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync //delete Node._instances[uid];
e139144ef4fc5f2bbe26be64faf2737cd8ccf413vboxsync * Applies the given function to each Node in the NodeList.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method each
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @deprecated Use NodeList
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Function} fn The function to apply
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * @param {Object} context optional An optional context to apply the function with
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Default context is the NodeList instance
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @chainable
131561c23ec73ceb3818b6df9ff32729642907dbvboxsync Y.log('each is deprecated on Node', 'warn', 'Node');
131561c23ec73ceb3818b6df9ff32729642907dbvboxsync * Retrieves the Node instance at the given index.
131561c23ec73ceb3818b6df9ff32729642907dbvboxsync * @method item
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @deprecated Use NodeList
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {Number} index The index of the target Node.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @return {Node} The Node instance at the given index.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync Y.log('item is deprecated on Node', 'warn', 'Node');
0912cf29d2641459d225c40114c567a63273746cvboxsync return this;
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Returns the current number of items in the Node.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @method size
0912cf29d2641459d225c40114c567a63273746cvboxsync * @deprecated Use NodeList
0912cf29d2641459d225c40114c567a63273746cvboxsync * @return {Int} The number of items in the Node.
0912cf29d2641459d225c40114c567a63273746cvboxsync size: function() {
0912cf29d2641459d225c40114c567a63273746cvboxsync Y.log('size is deprecated on Node', 'warn', 'Node');
0912cf29d2641459d225c40114c567a63273746cvboxsync * Inserts the content before the reference node.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @method insert
0912cf29d2641459d225c40114c567a63273746cvboxsync * @param {String | Y.Node | HTMLElement} content The content to insert
0912cf29d2641459d225c40114c567a63273746cvboxsync * @param {Int | Y.Node | HTMLElement | String} where The position to insert at.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @chainable
0912cf29d2641459d225c40114c567a63273746cvboxsync if (typeof content !== 'string') { // pass the DOM node
0912cf29d2641459d225c40114c567a63273746cvboxsync if (!where || // only allow inserting into this Node's subtree
0912cf29d2641459d225c40114c567a63273746cvboxsync (typeof where !== 'string' && this.contains(where)))) {
0912cf29d2641459d225c40114c567a63273746cvboxsync return this;
0912cf29d2641459d225c40114c567a63273746cvboxsync * Inserts the content as the firstChild of the node.
0912cf29d2641459d225c40114c567a63273746cvboxsync * @method prepend
7e37c6180f8e3d8ce94f29fcaaaa046d2466e6a3vboxsync * @param {String | Y.Node | HTMLElement} content The content to insert
0912cf29d2641459d225c40114c567a63273746cvboxsync * @chainable
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Inserts the content as the lastChild of the node.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method append
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @param {String | Y.Node | HTMLElement} content The content to insert
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @chainable
7e37c6180f8e3d8ce94f29fcaaaa046d2466e6a3vboxsync * Replaces the node's current content with the content.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @method setContent
e5967534664502b10b4b92306ad9d12a1a95a55evboxsync * @param {String | Y.Node | HTMLElement} content The content to insert
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @chainable
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync Y.DOM.addHTML(g_nodes[this[UID]], content, 'replace');
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync return this;
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync // TODO: need this?
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * The NodeList module provides support for managing collections of Nodes.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @module node
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * @submodule nodelist
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * The NodeList class provides a wrapper for manipulating DOM NodeLists.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * NodeList properties can be accessed via the set/get methods.
dee9e52b1688c0617890cbbd8a8488f9f315d1b7vboxsync * Use Y.all() to retrieve NodeList instances.
7e37c6180f8e3d8ce94f29fcaaaa046d2466e6a3vboxsync * @class NodeList
7e37c6180f8e3d8ce94f29fcaaaa046d2466e6a3vboxsync * @constructor
7e37c6180f8e3d8ce94f29fcaaaa046d2466e6a3vboxsyncY.Array._diff = function(a, b) {
present = false;
present = true;
continue outer;
if (!present) {
return removed;
Y.Array.diff = function(a, b) {
Y.stamp(this);
var ret = [],
ctx,
if (!instance) {
if (!tmp) {
return tmp;
var instance = this;
return instance;
var nodelist = this,
if (!instance) {
return nodelist;
var instance = this;
modulus: function(n, r) {
var nodes = [];
odd: function() {
even: function() {
destructor: function() {
refresh: function() {
var doc,
diff,
if (this._query) {
size: function() {
var ret = [],
if (!instance) {
return ret;
toString: function() {
node;
return nodeList;
Y.Array.each([
], function(method) {
return ret;
var methods = [
var onMutation = function(e) {
type,
evt,
evt = {};
for (field in e) {
var methods = [
Y.each([
function(name) {
getter: function() {
getter: function() {
if (node) {
getter: function() {
if (node) {
getter: function() {
getter: function() {