W3C home > Mailing lists > Public > www-svg@w3.org > August 2004

WG clarification request for SVG_WRONG_TYPE_ERR

From: Jonathan Watt <jonathan.watt@strath.ac.uk>
Date: Thu, 5 Aug 2004 21:38:34 +0100 (BST)
To: www-svg@w3.org
Message-ID: <Pine.GSO.4.10.10408052133460.10023-100000@shetland>

I'm looking for WG clarification on why SVG_WRONG_TYPE_ERR isn't
required to be thrown by all DOM methods that require arguments
to provide an SVG interface when there is no sensible action to take if
the argument doesn't support the interface. I specifically want to know
what should happen when createSVGTransformFromMatrix is passed an object
that is not an SVGMatrix. Should SVG_WRONG_TYPE_ERR be thrown? Should an
implementation defined exception be thrown - in which case why not an
SVG_WRONG_TYPE_ERR? Or should the identity matrix be used and no error
reported? Or is there some other course of action that makes sense?

In the case of createSVGTransformFromMatrix there is the possibility of
using the identity matrix, although it would seem bad not to notify the
user of the error to help them debug, but for some methods there is no
real course of action. For example, in SVGSVGElement, what should happen
for getIntersectionList or getEnclosureList if rect is not an SVGRect or
if referenceElement isn't an SVGElement or null?

Comments from non-WG members would also be welcomed.

Received on Thursday, 5 August 2004 16:38:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:59 UTC