Re: getSVGDocument()

Hi, Anne-

Anne van Kesteren wrote (on 2/15/08 8:56 PM):
> 
> On Fri, 15 Feb 2008 08:05:52 +0100, Oliver Hunt <oliver@apple.com> wrote:
>> I think Anne is asking if GetSVGDocument could be marked as an alias 
>> to contentDocument (and maybe deprecated?).
> 
> Yeah!

We understood the request; I asked Anne about it via IRC.  There are a 
couple of issues.

1) It's not really intuitive to make it an alias, because if someone 
called getSVGDocument() on an embedding element, they might get back an 
HTML document (for example), not an SVG document;

2) There is existing content that uses it, so deprecation is not trivial 
(though perhaps the authors could be persuaded to use contentDocument 
instead).


> Mostly I don't think we need getSVGDocument() at all, but apparently 
> there's some content using it so the simplest solution seems to make it 
> an alias for contentDocument (and maybe deprecate it, indeed, although 
> if that doesn't lead to removal in the future I'm not sure if it's worth 
> it).

The SVG WG may consider deprecating and/or removing it in a future 
version of the spec, if indeed it is seriously troublesome to 
implementors.  I'm personally sympathetic to this, since contentDocument 
seems to be more generic and consistent, and since the only bit of 
functionality it doesn't have, the document type checking, can be done 
with namespaceURI.


Regards-
-Doug Schepers
W3C Team Contact, SVG, CDF, and WebAPI

Received on Friday, 15 February 2008 15:32:36 UTC