1 var svgNS = "http://www.w3.org/2000/svg";
3 var svgRoot = document.createElementNS(svgNS, "svg");
4 document.documentElement.appendChild(svgRoot);
6 var svgText = document.createElementNS(svgNS, "text");
7 svgText.style.fontFamily = "Ahem";
8 svgText.style.fontSize = "20px";
9 svgText.appendChild(document.createTextNode("abc"));
10 svgRoot.appendChild(svgText);
12 shouldThrow("svgText.selectSubString(-1, 0)", '"IndexSizeError: Failed to execute \'selectSubString\' on \'SVGTextContentElement\': The charnum provided (4294967295) is greater than the maximum bound (3)."');
13 shouldNotThrow("svgText.getSubStringLength(0, -1)");
14 shouldThrow("svgText.getSubStringLength(3, 0)", '"IndexSizeError: Failed to execute \'getSubStringLength\' on \'SVGTextContentElement\': The charnum provided (3) is greater than or equal to the maximum bound (3)."');
17 document.documentElement.removeChild(svgRoot);
19 var successfullyParsed = true;