DescriptionThrow exceptions for charnum == getNumberOfChars in get{...}OfChar APIs
According to the spec [1], IndexSizeError should be thrown if:
"...the charnum is negative or if charnum is greater than or equal to
the number of characters at this node."
This is what's implemented by IE, Gecko and Presto.
[1] http://www.w3.org/TR/SVG11/text.html#__svg__SVGTextContentElement__getStartPositionOfChar
The current SVG2 draft has a different formulation:
(https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getStartPositionOfChar)
"If cluster is null, then then throw a DOMException with code
INDEX_SIZE_ERR."
but will have the same result.
BUG=391345
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201411
Patch Set 1 #
Messages
Total messages: 6 (2 generated)
|