JSFiddle - React, Tailwind, and code Playground

JavaScript

var svgNS = "http://www.w3.org/2000/svg";

var svgRoot = document.createElementNS(svgNS, "svg");
document.documentElement.appendChild(svgRoot);

var svgText = document.createElementNS(svgNS, "text");
svgText.style.fontFamily = "Ahem";
svgText.style.fontSize = "20px";
svgText.appendChild(document.createTextNode("abcdefg"));
svgRoot.appendChild(svgText);

function compareSVGPoints(a, b) {
    return a.x === b.x && a.y === b.y;
}

function compareSVGRects(a, b) {
    return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
}

try {
console.log(svgText.getSubStringLength(2, 2) == svgText.getSubStringLength(-4294967294, 2));
} catch(ex) {
 console.log(ex);   
}

try {
console.log(compareSVGPoints(svgText.getStartPositionOfChar(2), svgText.getStartPositionOfChar(-4294967294)));
} catch(ex) {
 console.log(ex);   
}

try {
console.log(compareSVGPoints(svgText.getEndPositionOfChar(2), svgText.getEndPositionOfChar(-4294967294)));
} catch(ex) {
 console.log(ex);   
}

try {
console.log(compareSVGRects(svgText.getExtentOfChar(2), svgText.getExtentOfChar(-4294967294)));
} catch(ex) {
 console.log(ex);   
}

try {
console.log(svgText.getRotationOfChar(2) == svgText.getRotationOfChar(-4294967294));
} catch(ex) {
 console.log(ex);   
}

try {
svgText.selectSubString(-4294967294,  2);
console.log("true");
} catch(ex) {
 console.log(ex);   
}

try {
    svgText.getSubStringLength();
    console.log('Oops, did not throw');
} catch(ex) {
    console.log("OK, did throw: " + ex);
}

try {
    svgText.getEndPositionOfChar();
    console.log('Oops, did not throw');
} catch(ex) {
    console.log("OK, did throw: " + ex);
}

try {
    svgText.getExtentOfChar();
    console.log('Oops, did not throw');
} catch(ex) {
    console.log("OK, did throw: " + ex);
}

try {
    svgText.getRotationOfChar();
    console.log('Oops, did not throw');
} catch(ex) {
    console.log("OK, did throw: " + ex);
}

try {
    svgText.selectSubString();
    console.log('Oops, did not...