* simonshutter wrote:
>I am traversing a list of group <g> elements where some have the 
>transform attribute and others don't.  What is the best cross-browser 
>test for the existence of an attribute?

.hasAttributeNS(null, 'name'), or with the namespace name specified
if you want to check for e.g. XLink attributes or xml:lang.

>When I use getAttribute('transform') in Opera 9 or FF2 and the 
>attribute doesn't exist, these browsers return null and typeof=object. 
>In IE(7) I get an empty value with typeof=string with length=0.

The correct behavior is to return an empty string, it is not possible
to use the getAttributeNS() family of methods to check for existance.
-- 
Björn Höhrmann · mailto:[EMAIL PROTECTED] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


-----
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