You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/10/01 02:33:40 UTC
svn commit: r451711 - /incubator/xap/trunk/src/xap/xml/dom/XapElement.js
Author: mturyn
Date: Sat Sep 30 19:33:40 2006
New Revision: 451711
URL: http://svn.apache.org/viewvc?view=rev&rev=451711
Log:
Methods added that iterators, bindings, and data sources will need---get the total number of children of a node, finding the index for a given node.
Modified:
incubator/xap/trunk/src/xap/xml/dom/XapElement.js
Modified: incubator/xap/trunk/src/xap/xml/dom/XapElement.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/XapElement.js?view=diff&rev=451711&r1=451710&r2=451711
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/XapElement.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/XapElement.js Sat Sep 30 19:33:40 2006
@@ -992,6 +992,27 @@
}
return xap.util.ArrayHelper.indexOf(this.childNodes, aChild);
}
+/**
+ * Needed for Iterator
+ * @return {int}
+ */
+xap.xml.dom.XapElement.prototype.getChildCount = function() {
+ if(this.childNodes == null){
+ return 0;
+ }
+ return this.childNodes.length ;
+}
+
+
+
+
+/**
+ * Needed for Iterator
+ * @return {int}
+ */
+xap.xml.dom.XapElement.prototype.getChildAt = function(anInt) {
+ return this.childNodes[anInt] ;
+}
//-----------------------------------------------------------------------