Permalink
Browse files

build node

  • Loading branch information...
1 parent 117aaf7 commit 729bc059dc5ce4dcc245db8b49bb3ddecf9f5b79 @msweeney msweeney committed Apr 25, 2012
@@ -277,10 +277,12 @@ Y.NodeList.importMethod(Y.Node.prototype, [
*/
'append',
- /** Called on each Node instance
- * @method insert
- * @see Node.insert
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method insert
+ * @see Node.insert
+ */
'insert',
/**
@@ -291,42 +293,56 @@ Y.NodeList.importMethod(Y.Node.prototype, [
*/
'appendChild',
- /** Called on each Node instance
- * @method insertBefore
- * @see Node.insertBefore
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method insertBefore
+ * @see Node.insertBefore
+ */
'insertBefore',
- /** Called on each Node instance
- * @method prepend
- * @see Node.prepend
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method prepend
+ * @see Node.prepend
+ */
'prepend',
- /** Called on each Node instance
- * Note that this passes to innerHTML and is not escaped.
- * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
- * @method setContent
- * @deprecated Use setHTML
- */
+ /**
+ * Called on each Node instance
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ * @for NodeList
+ * @method setContent
+ * @deprecated Use setHTML
+ */
'setContent',
- /** Called on each Node instance
- * @method getContent
- * @deprecated Use getHTML
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method getContent
+ * @deprecated Use getHTML
+ */
'getContent',
- /** Called on each Node instance
- * @method setHTML
- * Note that this passes to innerHTML and is not escaped.
- * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
- */
+ /**
+ * Called on each Node instance
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ * @for NodeList
+ * @method setHTML
+ * @see Node.setHTML
+ */
'setHTML',
- /** Called on each Node instance
- * @method getHTML
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method getHTML
+ * @see Node.getHTML
+ */
'getHTML'
]);
/**
@@ -277,10 +277,12 @@ Y.NodeList.importMethod(Y.Node.prototype, [
*/
'append',
- /** Called on each Node instance
- * @method insert
- * @see Node.insert
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method insert
+ * @see Node.insert
+ */
'insert',
/**
@@ -291,42 +293,56 @@ Y.NodeList.importMethod(Y.Node.prototype, [
*/
'appendChild',
- /** Called on each Node instance
- * @method insertBefore
- * @see Node.insertBefore
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method insertBefore
+ * @see Node.insertBefore
+ */
'insertBefore',
- /** Called on each Node instance
- * @method prepend
- * @see Node.prepend
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method prepend
+ * @see Node.prepend
+ */
'prepend',
- /** Called on each Node instance
- * Note that this passes to innerHTML and is not escaped.
- * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
- * @method setContent
- * @deprecated Use setHTML
- */
+ /**
+ * Called on each Node instance
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ * @for NodeList
+ * @method setContent
+ * @deprecated Use setHTML
+ */
'setContent',
- /** Called on each Node instance
- * @method getContent
- * @deprecated Use getHTML
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method getContent
+ * @deprecated Use getHTML
+ */
'getContent',
- /** Called on each Node instance
- * @method setHTML
- * Note that this passes to innerHTML and is not escaped.
- * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
- */
+ /**
+ * Called on each Node instance
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ * @for NodeList
+ * @method setHTML
+ * @see Node.setHTML
+ */
'setHTML',
- /** Called on each Node instance
- * @method getHTML
- */
+ /**
+ * Called on each Node instance
+ * @for NodeList
+ * @method getHTML
+ * @see Node.getHTML
+ */
'getHTML'
]);
/**
@@ -1176,26 +1176,46 @@ Y.mix(NodeList.prototype, {
}, true);
NodeList.importMethod(Y.Node.prototype, [
- /** Called on each Node instance
+ /**
+ * Called on each Node instance. Nulls internal node references,
+ * removes any plugins and event listeners
* @method destroy
+ * @param {Boolean} recursivePurge (optional) Whether or not to
+ * remove listeners from the node's subtree (default is false)
* @see Node.destroy
*/
'destroy',
- /** Called on each Node instance
+ /**
+ * Called on each Node instance. Removes and destroys all of the nodes
+ * within the node
* @method empty
+ * @chainable
* @see Node.empty
*/
'empty',
- /** Called on each Node instance
+ /**
+ * Called on each Node instance. Removes the node from its parent.
+ * Shortcut for myNode.get('parentNode').removeChild(myNode);
* @method remove
+ * @param {Boolean} destroy whether or not to call destroy() on the node
+ * after removal.
+ * @chainable
* @see Node.remove
*/
'remove',
- /** Called on each Node instance
+ /**
+ * Called on each Node instance. Sets an attribute on the Node instance.
+ * Unless pre-configured (via Node.ATTRS), set hands
+ * off to the underlying DOM node. Only valid
+ * attributes/properties for the node will be set.
+ * To set custom attributes use setAttribute.
* @method set
+ * @param {String} attr The attribute to be set.
+ * @param {any} val The value to set the attribute to.
+ * @chainable
* @see Node.set
*/
'set'
@@ -1453,7 +1473,7 @@ Y.Array.each([
Y.Node.prototype.removeAttribute = function(attr) {
var node = this._node;
if (node) {
- node.removeAttribute(attr);
+ node.removeAttribute(attr, 0); // comma zero for IE < 8 to force case-insensitive
}
return this;
Oops, something went wrong.

0 comments on commit 729bc05

Please sign in to comment.