- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Fri, 27 Jan 2006 00:29:39 -0600
- To: www-svg@w3.org
I apologize for losing track of this when this was originally discussed, but I
still don't see why getCurrentFocusedObject returns a DOMObject. Let me
summarize the situation as I understand it:
1) The focused object may not be a Node
2) If the focused object is in the SVG namespace, it "should be cased to
events::EventTarget" (whatever that means in a strongly typed language,
since that's not the return type of the method).
There were two issues that Ola Andersson's response [1] did not address:
1) What does it mean that an object is "in the SVG Namespace" if it is
not a Node? The concept of being in a namespace is rather tied to Nodes.
2) What prevents the return value of getCurrentFocusedObject from
simply being an events::EventTarget? I would think that anything
capable of receiving focus is in fact an event target... This would
also eliminate the need for the discussion of namespaces and casting
here. Note that per DOM 2 Events "The EventTarget interface is
implemented by all Nodes in an implementation which supports the DOM
Event Model." [2] So certainly all Nodes could be returned from this
method.
Again, my apologies for not getting this sent in early Decembed, but issue
SVGT12-302 is unfortunately not resolved to my satisfaction.
-Boris
[1] http://lists.w3.org/Archives/Public/www-svg/2005Dec/0011.html
[2]
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget
Received on Friday, 27 January 2006 06:29:45 UTC