W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

[SVGMobile12] SVGElementInstance, EventTarget, currentTarget, use and defs

From: Jeff Schiller <codedread@gmail.com>
Date: Tue, 3 Jan 2006 08:47:32 -0600
Message-ID: <da131fde0601030647x2fa0a4fbvb7db34eded615a4c@mail.gmail.com>
To: www-svg@w3.org

I'm really having trouble understanding several things related to
element instances from the IDL Appendix:

Section A.4.3 describes the Event interface where it states:  "If an
event target is an element instance (see SVGElementInstance), the
currentTarget is an implementation of EventTarget that does not
implement the Node interface. In profiles of SVG that support the
SVGElementInstance interface, the currentTarget is an

- first, currentTarget is of type EventTarget which does not include
the Node interface, so this first sentence seems redundant to me
- second, how can you have an IDL attribute that returns either an
EventTarget or a SVGElementInstance depending on whether the
SVGElementInstance is supported?  Could an implementation not support

Next, looking at Section A.7.3 (SVGElementInstance) it states in the
example "Worth noticing is that if the original 'rect' had not been in
the 'defs' element the script would go into error when the original
'rect' is clicked. This is becouse the 'currentTarget' attribute would
return an 'SVGElement' that doesen't have the
'correspondingUseElement' attribute."

This states that currentTarget would be a SVGElement (not a simple
EventTarget or a SVGElementInstance as in Section A.4.3) if the rect
was outside of the 'defs' element.  I couldn't determine why if the
rect is not in the 'defs' element that the behavior would be different
for the "use" elements.  I couldn't find this in "use" (5.6) or "defs"
(5.3) sections.

Can you please clarify the behavior between EventTarget, currentTarget
attribute, SVGElementInstance, use and defs for me?  It's likely that
I'm just not connecting the dots properly in my head but I feel the
text could be clarified in the listed sections.

Received on Tuesday, 3 January 2006 14:47:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:06 UTC