- From: Jeff Schiller <codedread@gmail.com>
- Date: Tue, 3 Jan 2006 08:47:32 -0600
- 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 SVGElementInstance." - 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 SVGElementInstance? 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. Thanks, Jeff
Received on Tuesday, 3 January 2006 14:47:35 UTC