JSDOM ^15.2 || 16 document.activeElement issue

node v10.24.1
version: 1.0.0
endpointsharetweet
const { JSDOM } = require("jsdom"); const { window: { document } } = new JSDOM(` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JSDOM</title> </head> <body> <input /> </body> </html> `); const logActiveElement = () => console.log(`document.activeElement: ${String(document.activeElement)}`); const button = document.querySelector("input"); logActiveElement(); button.focus(); logActiveElement();
Loading…

no comments

    sign in to comment