[Dojo-checkins] dante - r16332 - dojo/trunk/_base

dojo-checkins-admin at dojotoolkit.org dojo-checkins-admin at dojotoolkit.org
Thu Jan 15 00:28:54 UTC 2009


Author: dante
Date: Wed Jan 14 16:28:51 2009
New Revision: 16332

Modified:
   dojo/trunk/_base/NodeList.js
Log:
refs #7461 - fixing inline docs for nodelist (slightly). adopt and place pass through position to place(), which introduced 
only and replace (if i'm not mistaken). These may not be desireable. It is also worth expanding upon the behavior of dojo.place() when used with complex creation, and the end results of only and replace. but that can be covered in user docs. 



Modified: dojo/trunk/_base/NodeList.js
==============================================================================
--- dojo/trunk/_base/NodeList.js	(original)
+++ dojo/trunk/_base/NodeList.js	Wed Jan 14 16:28:51 2009
@@ -303,17 +303,19 @@
 		place: function(/*String||Node*/ queryOrNode, /*String*/ position){
 			//	summary:
 			//		places elements of this node list relative to the first element matched
-			//		by queryOrNode. Returns the original NodeList.
+			//		by queryOrNode. Returns the original NodeList. See: `dojo.place`
 			//	queryOrNode:
 			//		may be a string representing any valid CSS3 selector or a DOM node.
 			//		In the selector case, only the first matching element will be used 
 			//		for relative positioning.
 			//	position:
 			//		can be one of:
-			//			* "last"||"end" (default)
-			//			* "first||"start"
-			//			* "before"
-			//			* "after"
+			//		|	* "last" (default)
+			//		|	* "first"
+			//		|	* "before"
+			//		|	* "after"
+			//		|	* "only"
+			//		|	* "replace"
 			// 		or an offset in the childNodes property
 			var item = d.query(queryOrNode)[0];
 			return this.forEach(function(i){ d.place(i, item, position); }); // dojo.NodeList
@@ -346,10 +348,12 @@
 			//		first element of this NodeList.
 			//	position:
 			//		can be one of:
-			//			* "last"||"end" (default)
-			//			* "first||"start"
-			//			* "before"
-			//			* "after"
+			//		|	* "last" (default)
+			//		|	* "first"
+			//		|	* "before"
+			//		|	* "after"
+			//		|	* "only"
+			//		|	* "replace"
 			// 		or an offset in the childNodes property
 			var item = this[0];
 			return d.query(queryOrListOrNode).forEach(function(ai){ // dojo.NodeList
@@ -407,7 +411,7 @@
 			//		|	dojo.query("*").filter(function(item){
 			//		|		// highlight every paragraph
 			//		|		return (item.nodeName == "p");
-			//		|	}).styles("backgroundColor", "yellow");
+			//		|	}).style("backgroundColor", "yellow");
 			// example:
 			//		the same filtering using a CSS selector
 			//		|	dojo.query("*").filter("p").styles("backgroundColor", "yellow");


More information about the Dojo-checkins mailing list