3
Copyright 2012 Yahoo! Inc. All rights reserved.
4
Licensed under the BSD License.
5
http://yuilibrary.com/license/
7
YUI.add('node-deprecated', function(Y) {
11
* @submodule node-deprecated
18
* Flat data store for off-DOM usage
21
* @deprecated Use getData/setData
28
setter: function(val) {
36
* Returns a single Node instance bound to the node or the
37
* first element matching the given selector.
40
* @deprecated Use Y.one
42
* @param {String | HTMLElement} node a node or Selector
43
* @param {Node | HTMLElement} doc an optional document to scan. Defaults to Y.config.doc.
47
* Returns a single Node instance bound to the node or the
48
* first element matching the given selector.
51
* @deprecated Use Y.one
53
* @param {String | HTMLElement} node a node or Selector
54
* @param {Node | HTMLElement} doc an optional document to scan. Defaults to Y.config.doc.
56
Y.get = Y_Node.get = function() {
57
return Y_Node.one.apply(Y_Node, arguments);
61
Y.mix(Y_Node.prototype, {
63
* Retrieves a Node instance of nodes based on the given CSS selector.
65
* @deprecated Use one()
66
* @param {string} selector The CSS selector to test against.
67
* @return {Node} A Node instance for the matching HTMLElement.
69
query: function(selector) {
70
return this.one(selector);
74
* Retrieves a nodeList based on the given CSS selector.
76
* @deprecated Use all()
77
* @param {string} selector The CSS selector to test against.
78
* @return {NodeList} A NodeList instance for the matching HTMLCollection/Array.
80
queryAll: function(selector) {
81
return this.all(selector);
85
* Applies the given function to each Node in the NodeList.
87
* @deprecated Use NodeList
88
* @param {Function} fn The function to apply
89
* @param {Object} context optional An optional context to apply the function with
90
* Default context is the NodeList instance
93
each: function(fn, context) {
94
context = context || this;
95
return fn.call(context, this);
99
* Retrieves the Node instance at the given index.
101
* @deprecated Use NodeList
103
* @param {Number} index The index of the target Node.
104
* @return {Node} The Node instance at the given index.
106
item: function(index) {
111
* Returns the current number of items in the Node.
113
* @deprecated Use NodeList
114
* @return {Int} The number of items in the Node.
117
return this._node ? 1 : 0;
125
}, '3.5.1' ,{requires:['node-base']});