--- In [email protected], Cameron McCormack <cam-svg-
[EMAIL PROTECTED]> wrote:
> Francis Hemsher:
> > Why even consider eventListener when XML already has adequate
> > methods to handle the event attribute for an SVG element.
Please!,
> > Show me something that the DOM, excluding the redundancy of
> > eventListener, cannot handle.
> Two things that come to mind:
>
> - You can use addEventListener more than once to have multiple
> event listeners on a node, whereas in an onXXX attribute you
> can define only one.
I would go this way in one coding block:
myElement.setAttribute("onclick","myClickFunction()")
myElement.setAttribute("onmouseover","myMouseOver()")
myElement.setAttribute("onmouseout","myMouseOut()")
...etc.
To dynamically dump them:
myElement.removeAttribute("onclick")
myElement.removeAttribute("onmouseover")
myElement.removeAttribute("onmouseout")
> - You can add capturing event listeners with addEventListener,
> but the onXXX attributes define only non-capturing event
listeners.
Can you show me an example of the above? Believe me, I'm glad to
learn new techniques.
Thanks,
Francis
-----
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/
<*> 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/