Hi folks,

I've always used something like 

    O.setAttribute("onclick","add(evt)")  

to attach an event handler in SVG. But someone told me recently that 

    O.addEventListener("click", function(evt){add(evt)}, false)

is actually preferrable. (The person who told me this obviously has young 
fingers!)

Well, why might that be? I have yet to see an example that fails to run in any 
browser or hand-held device because of using the simpler construction, but then 
I have seen only a finite number of examples. I know the simpler example will 
not work in HTML but I always assumed thie was because of the dysfunctional 
nature of HTML.;) 

Why are the extra keystrokes preferred, and by whom are the preferred? (Is the 
preference merely a function of the age of one's fingers?)

cheers
David

[Non-text portions of this message have been removed]



------------------------------------

-----
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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:
    svg-developers-dig...@yahoogroups.com 
    svg-developers-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    svg-developers-unsubscr...@yahoogroups.com

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

Reply via email to