MDN self-hosted library · e01.org

DOMPointReadOnly: fromPoint() static method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const point2D = DOMPointReadOnly.fromPoint({ x: 25, y: 25 });
js
const origPoint = new DOMPoint(25, 25, 100, 0.5);

const newPoint = DOMPointReadOnly.fromPoint(origPoint);