I have to change the attributes of a large number of elements.  I use 
the code below:

var i=0;
var elm;
var r=document.getElementById('test');
var colR=r.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'rect');
while(elm=colR.item(i++)){
    elm.setAttributeNS(null,'y',elm.getAttributeNS
('http://www.schemax.com/r','y2'));
}

IE/ASV3 and Op9 appear to perform the changes equally well but FF is 
considerably slower.  For example to change the attributes of 500 
elements:

IE/ASV3 and Op9 = 15 msec
FF2 = 115682 msec

Any ideas?  Am I using the while loop inappropriately?

Thanks, Simon





-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to