RunKit + npm: jsdom

node v8.16.2
endpointsharetweet
const jsdom = require("jsdom"); const { JSDOM } = jsdom; const { window } = new JSDOM(``, { runScripts: "dangerously", url: "https://example.org/", }); window.eval(` console.log("before", localStorage.setItem); localStorage.setItem = (...args) => console.log(...args); console.log("after", localStorage.setItem); `);
Created from: https://npm.runkit.com/jsdom
Loading…