I need to get the SVGPoint of an <svg>
element but for some reason, it doesn't work in my scenario.
Consider the following HTML
<body>
<svg id="inline">
</svg>
</body>
And the javascript
var s1 = document.getElementById('inline');
console.log('point', s1.createSVGPoint());
var s2 = document.createElement("svg");
s2.setAttribute("id", "inserted");
document.getElementsByTagName('body')[0].appendChild(s2);
console.log('point2', s2.createSVGPoint());
The first "point" gets outputtet as expected but the "point2" output prints an error in chrome:
Uncaught TypeError: s2.createSVGPoint is not a function
I've created a small plunker to demonstrate: