W3C home > Mailing lists > Public > public-svg-wg@w3.org > April to June 2009

"Clarify getSVGDocument behavior" erratum

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 15 May 2009 15:30:55 +1000
To: public-svg-wg@w3.org
Message-ID: <20090515053055.GH11882@arc.mcc.id.au>
Hi WG.

I was going through the SVG 1.1 errata document today, getting it
prepared for publication.  Looking at
http://www.w3.org/2003/01/REC-SVG11-20030114-errata#clarify-getsvgdocument-behavior
I’m not happy with the current replacement wording, which is:

  This method must return the Document object of embedded content in an
  embedding element, or null if there is no document.

  Informative Note: This is a legacy method equivalent to
  contentDocument, and may not always return an SVG Document. The author
  should check the namespaceURI or the root node tag name before using
  the returned document.

The getSVGDocument() operation is defined to return an SVGDocument, so
it’s not possible to conform to the IDL and return a Document that isn’t
an SVGDocument.

I think we should either change the return type to be Document, or
define that it returns null if the document isn’t an SVG document.


Also, the wording about implementing this on HTML <object> DOM objects
has been lost.  Without it, nothing implements this interface.  If we
are really not interested in it being implemented (since, as Anne points
out, you would typically use contentDocument in a browser), then perhaps
we can just drop the interface altogether.

Thanks,

Cameron

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 15 May 2009 05:31:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 15 May 2009 05:31:47 GMT