Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #81 from lexander/patch-2

Updated documentation for NodeList methods that are imported from Node
  • Loading branch information...
commit bb3b9cbecad8f3f20810b4569bf70ea9a8b94b0c 2 parents 1b084f3 + ea0ac1b
@msweeney msweeney authored
Showing with 24 additions and 4 deletions.
  1. +24 −4 src/node/js/nodelist.js
View
28 src/node/js/nodelist.js
@@ -348,26 +348,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'
Please sign in to comment.
Something went wrong with that request. Please try again.