Lines Matching defs:NodeList

2  * The NodeList module provides support for managing collections of Nodes.
8 * The NodeList class provides a wrapper for manipulating DOM NodeLists.
9 * NodeList properties can be accessed via the set/get methods.
10 * Use Y.all() to retrieve NodeList instances.
12 * @class NodeList
16 var NodeList = function(nodes) {
40 * The underlying array of DOM nodes bound to the Y.NodeList instance
47 NodeList.NAME = 'NodeList';
50 * Retrieves the DOM nodes bound to a NodeList instance
54 * @param {NodeList} nodelist The NodeList instance
55 * @return {Array} The array of DOM nodes bound to the NodeList
57 NodeList.getDOMNodes = function(nodelist) {
61 NodeList.each = function(instance, fn, context) {
66 Y.log('no nodes bound to ' + this, 'warn', 'NodeList');
70 NodeList.addMethod = function(name, fn, context) {
72 NodeList.prototype[name] = function() {
83 instance = NodeList._getTempNode(node);
96 Y.log('unable to add method: ' + name + ' to NodeList', 'warn', 'node');
100 NodeList.importMethod = function(host, name, altName) {
103 NodeList.addMethod(name, host[name]);
106 NodeList.importMethod(host, n);
111 NodeList._getTempNode = function(node) {
112 var tmp = NodeList._tempNode;
115 NodeList._tempNode = tmp;
123 Y.mix(NodeList.prototype, {
149 * Applies the given function to each Node in the NodeList.
152 * the current node instance, the node's index, and the NodeList instance
172 instance = NodeList._getTempNode(node);
184 * the current node instance, the node's index, and the NodeList instance
199 * Creates a documenFragment from the nodes bound to the NodeList instance
208 * Returns the index of the node in the NodeList instance
219 * Filters the NodeList instance down to only nodes matching the given selector.
222 * @return {NodeList} NodeList containing the updated collection
231 * Creates a new NodeList containing all nodes at every n indices, where
237 * @return {NodeList} NodeList containing the updated collection
242 NodeList.each(this, function(node, i) {
252 * Creates a new NodeList containing all nodes at odd indices
255 * @return {NodeList} NodeList containing the updated collection
262 * Creates a new NodeList containing all nodes at even indices
265 * @return {NodeList} NodeList containing the updated collection
299 * Returns the current number of items in the NodeList.
301 * @return {Int} The number of items in the NodeList.
310 * @return {Boolean} Whether or not the NodeList is bound to any nodes
350 NodeList.importMethod(Y.Node.prototype, [
396 // one-off implementation to convert array of Nodes to NodeList
403 NodeList.prototype.get = function(attr) {
407 getTemp = NodeList._getTempNode,
427 if (!isNodeList) { // convert array of Nodes to NodeList
437 Y.NodeList = NodeList;
440 return new NodeList(nodes);