const svgPath = document.querySelector("path");
const pathData = path.getPathData({ normalize: true });
svgPath.setPathData(pathData);
// <path d="M 0 0 L 64 0 L 64 64 L 0 64 Z" />SVGPathElement: setPathData() method / notebook
SVGPathElement: setPathData() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.