const pos = new CSSPositionValue(
new CSSUnitValue(5, "px"),
new CSSUnitValue(10, "px"),
);
console.log(pos.x.value); // 5
console.log(pos.y.value); // 10CSSUnitValue: value property / notebook
CSSUnitValue: value property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.