Skip to content

Commit

Permalink
Clarify Node vs NodeList method docs
Browse files Browse the repository at this point in the history
Node and NodeList both import methods from DOM.  The doc comments seem to have been written for NodeList and copy/pasted for Node.  It didn't make sense for a Node method to act on 'each node' so the wording has been clarified.
  • Loading branch information
solmsted committed Mar 10, 2014
1 parent 2be42ee commit 917c8c0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/node/js/node-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@

var methods = [
/**
* Determines whether each node has the given className.
* Determines whether the node has the given className.
* @method hasClass
* @for Node
* @param {String} className the class name to search for
* @return {Boolean} Whether or not the element has the specified class
* @return {Boolean} Whether or not the node has the specified class
*/
'hasClass',

/**
* Adds a class name to each node.
* Adds a class name to the node.
* @method addClass
* @param {String} className the class name to add to the node's class attribute
* @chainable
*/
'addClass',

/**
* Removes a class name from each node.
* Removes a class name from the node.
* @method removeClass
* @param {String} className the class name to remove from the node's class attribute
* @chainable
*/
'removeClass',

/**
* Replace a class with another class for each node.
* Replace a class with another class on the node.
* If no oldClassName is present, the newClassName is simply added.
* @method replaceClass
* @param {String} oldClassName the class name to be replaced
Expand Down Expand Up @@ -63,15 +63,15 @@ Y.Node.importMethod(Y.DOM, methods);
* Adds a class name to each node.
* @method addClass
* @see Node.addClass
* @param {String} className the class name to add to the node's class attribute
* @param {String} className the class name to add to each node's class attribute
* @chainable
*/

/**
* Removes a class name from each node.
* @method removeClass
* @see Node.removeClass
* @param {String} className the class name to remove from the node's class attribute
* @param {String} className the class name to remove from each node's class attribute
* @chainable
*/

Expand All @@ -86,7 +86,7 @@ Y.Node.importMethod(Y.DOM, methods);
*/

/**
* If the className exists on the node it is removed, if it doesn't exist it is added.
* For each node, if the className exists on the node it is removed, if it doesn't exist it is added.
* @method toggleClass
* @see Node.toggleClass
* @param {String} className the class name to be toggled
Expand Down

0 comments on commit 917c8c0

Please sign in to comment.