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 jm...@apache.org on 2007/10/03 01:21:49 UTC
svn commit: r581463 -
/incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js
Author: jmargaris
Date: Tue Oct 2 18:21:49 2007
New Revision: 581463
URL: http://svn.apache.org/viewvc?rev=581463&view=rev
Log:
efficiency changes
Modified:
incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js
Modified: incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js?rev=581463&r1=581462&r2=581463&view=diff
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js (original)
+++ incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js Tue Oct 2 18:21:49 2007
@@ -296,11 +296,6 @@
* @return {google.XNode} removed child node or null
*/
xap.xml.dom.XapElement.prototype.removeChild = function(child) {
-
- var index = xap.util.ArrayHelper.indexOf(this.childNodes, child);
-
- if( (!child) || (index == -1) ) { return null; }
-
var doc = this.ownerDocument;
var structureChangeListenerExists = this._doAnyStructureChangeListenersExist( doc );
@@ -308,8 +303,8 @@
//notify listeners before the change takes place
if ( structureChangeListenerExists ) {
- event = new xap.xml.dom.events.StructureChangeEvent(this, child, index);
- this._fireStructureChangeEvent( doc, event, 'beforeChildRemoved');
+ event = new xap.xml.dom.events.StructureChangeEvent(this, child, 0);//not doing index
+ // this._fireStructureChangeEvent( doc, event, 'beforeChildRemoved');
}
//make the actual change