[svgwg] What should happen if you try to set an out of range value on an enum in the DOM

longsonr has just created a new issue for https://github.com/w3c/svgwg:

== What should happen if you try to set an out of range value on an enum in the DOM ==
The specification says not to throw. https://svgwg.org/svg2-draft/types.html#__svg__SVGAnimatedEnumeration__baseVal

Edge seems to implement the specification as written, however....

There are lots of web-platform tests that have it as throwing a TypeError e.g. https://wpt.fyi/svg/types/scripted/SVGAnimatedEnumeration-SVGClipPathElement.html

Chrome implements the throwing functionality of the web-platform tests

Firefox and Safari both throw, but they throw something else.

Should I change Firefox not to throw and fix the tests as well, or do we want the throwing behaviour in which case the spec needs fixing.

Although the specification does not explicitly say so, if it doesn't throw presumably setting an out of range value should result in the baseValue becoming 0 (the unknown value). If it does throw it probably makes more sense to leave the baseValue unchanged (which is what browsers other than Edge do now I think).



Please view or discuss this issue at https://github.com/w3c/svgwg/issues/423 using your GitHub account

Received on Monday, 23 April 2018 06:50:53 UTC