W3C home > Mailing lists > Public > www-svg@w3.org > December 2005

Re: SVG12: getCurrentFocusedObject return type

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 23 Dec 2005 10:21:13 +0100
To: Andrew Shellshear <Andrew.Shellshear@cisra.canon.com.au>
Cc: www-svg@w3.org, SVG WG <w3c-svg-wg@w3.org>
Message-ID: <u3gnq1ds26votu3kp9vg6iauhv2440ipq0@hive.bjoern.hoehrmann.de>

* Andrew Shellshear wrote:
>On Mon, 04 Jul 2005 04:23:03 +0200, Bjoern wrote:
>>   http://www.w3.org/TR/2005/WD-SVGMobile12-20050413/svgudom.html states
>> that getCurrentFocusedObject() returns a DOMObject; this does not make
>> much sense to me, from the draft it seems that only event targets can
>> be currently focused objects, i.e. SVGDocument, SVGElementInstance,
>> and SVGElement objects, all of which implement EventTarget, so this
>> should really return an events::EventTarget object. If there are cases
>> where objects can have focus that are not event targets, please point
>> this out clearly in the draft. If there are not, please change the
>> return type to events::EventTarget.
>We have added the following explanitary text to the description of getCurrentFocusedObject in
>http://www.w3.org/TR/2005/WD-SVGMobile12-20050413/svgudom.html#svg::SVGSVGElement -
>Returns a reference to the object which has the focus.  This returns a 
>DOMObject because the currently focused object may be an object outside 
>the SVG namespace.  If the currently focused object is in the SVG 
>namespace, it should be cast to events::EventTarget.

The Working Group would need to cite a convincing case in which the
currently focused object does not implement the EventTarget interface
and explain why script authors would nevertheless need access to this
object and take that into account e.g. in the moveFocus definition
which currently requires to dispatch events to these non event targets.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Friday, 23 December 2005 09:21:35 UTC

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