Следующий, довольно глупый, код отлично работает в Firefox, но в chrome происходит то, что указано в комментариях. Хотел проверить функциональность SVG, поэтому я проверяю, является ли центр эллипса точкой заполнения этого эллипса, что, очевидно, верно. Загадочным фактом являются первые два журнала консоли. Вывод точки Dom как "Dom point", а затем ее typeof as object, что естественным образом прерывает следующие два оператора console.log.
let ellipseFirstStop = document.getElementById("Sation_1_circle"); //Sation_1_circle is an SVG ellipse.
let centroFirstStop = new DOMPoint(+ellipseFirstStop.cx.animVal.value, +ellipseFirstStop.cy.animVal.value);
console.log(centroFirstStop);
//outputs DOMPoint {x: 268.2749938964844, y: 183.63299560546875, z: 0, w: 1}, all fine.
console.log(typeof centroFirstStop);
//outputs "object", what?
console.log("is point in fill test: "+ellipseFirstStop.isPointInFill(centroFirstStop));
//causes: Uncaught TypeError: Failed to execute 'isPointInFill' on 'SVGGeometryElement' parameter 1 is not of type 'SVGPoint'.
console.log("is point in fill test: "+ellipseFirstStop.isPointInFill(new DOMPoint(+ellipseFirstStop.cx.animVal.value, +ellipseFirstStop.cy.animVal.value)));
//causes: Uncaught TypeError: Failed to execute 'isPointInFill' on 'SVGGeometryElement': parameter 1 is not of type 'SVGPoint'.