- From: Ola Andersson <Ola.Andersson@ikivo.com>
- Date: Fri, 2 Dec 2005 09:48:28 +0100
- To: <www-svg@w3.org>, <bzbarsky@mit.edu>
- Message-ID: <586AE9F507AF5E4AA45364333D9E2FA2FB34F4@sesthsrv02.zoomon.local>
Hi Boris, I'm just replying to your last question since I don't know anything about Gecko. The reason not to return a Node is because you can set focus on an SVGElementInstance (like a use:d element) which isn't a Node but an EventTarget. /ola From: Boris Zbarsky <bzbarsky@mit.edu <mailto:bzbarsky@mit.edu?Subject=Re:%20SVG12:%20DOMObject%20portability& In-Reply-To=%3C435E4623.101@mit.edu%3E&References=%3C435E4623.101@mit.ed u%3E> > Date: Tue, 25 Oct 2005 09:50:11 -0500 Message-ID: <435E4623.101@mit.edu> To: Andrew Shellshear <Andrew.Shellshear@cisra.canon.com.au <mailto:Andrew.Shellshear@cisra.canon.com.au?Subject=Re:%20SVG12:%20DOMO bject%20portability&In-Reply-To=%3C435E4623.101@mit.edu%3E&References=%3 C435E4623.101@mit.edu%3E> > CC: www-svg@w3.org <mailto:www-svg@w3.org?Subject=Re:%20SVG12:%20DOMObject%20portability&In -Reply-To=%3C435E4623.101@mit.edu%3E&References=%3C435E4623.101@mit.edu% 3E> , SVG WG <w3c-svg-wg@w3.org <mailto:w3c-svg-wg@w3.org?Subject=Re:%20SVG12:%20DOMObject%20portability &In-Reply-To=%3C435E4623.101@mit.edu%3E&References=%3C435E4623.101@mit.e du%3E> > Andrew Shellshear wrote: > 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::SVGS VGElement > - > > 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. I'm trying to figure out how this would work in a strongly typed language (C++, say). Who's doing the casting? For example, the C++ binding in Gecko for the IDL involved would look like (unrolling some typedefs): int GetCurrentFocusedObject(ISupports **); Now how is the suggested explanatory text supposed to be implemented in this situation, exactly? Is there a reason not to just return a Node to start with? Then the caller could actually check for the SVG namespace and cast to events::EventTarget or EventTarget or whatever is appropriate as needed. Or are there cases when the "focused object" is not a Node? If so, what does it mean for it to be "in the SVG namespace"? -Boris
Received on Friday, 2 December 2005 08:48:36 UTC