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/11 07:31:59 UTC
svn commit: r583713 -
/incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js
Author: jmargaris
Date: Thu Oct 11 00:31:59 2007
New Revision: 583713
URL: http://svn.apache.org/viewvc?rev=583713&view=rev
Log:
don't construct cloned array of attributes, not needed
Modified:
incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js
Modified: incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js?rev=583713&r1=583712&r2=583713&view=diff
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js (original)
+++ incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js Thu Oct 11 00:31:59 2007
@@ -193,24 +193,9 @@
*/
xap.taghandling.AbstractTagImpl.prototype.parseInitialAttributes = function( e ) {
var attributes = e.attributes;
-
- var names = new Array(attributes.length);
- //have to copy them over, because as we add attributes the enumeration
- //itself changes. This is a problem if adding an attribute causes
- //more attributes to be added, which can happen with class when
- //the stylesheet attributes are added, and we get tricked into
- //thinking they are not from the stylesheet. Instead, we think
- //they were an initial attribute since they were tacked on to the
- //enumeration
-
- for (var i = 0; i<attributes.length; i++){
- var attributeName = e.attributes[i].nodeName;
- names[i] = attributeName;
- }
-
- for ( var i=0; i < names.length; i++ ) {
- var attributeName = names[i];
+ for ( var i=0; i < attributes.length; i++ ) {
+ var attributeName = attributes[i].nodeName;
var attributeValue = e.getAttribute( attributeName );
var event = new xap.xml.dom.events.AttributeChangeEvent( e, attributeName, attributeValue );
// change the value