Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

RunKit + npm: jsdom

node v11.15.0
version: master
endpointsharetweet
const { JSDOM } = require("jsdom"); var jsDomDoc = new JSDOM(`<!doctype html><html><head><title>some doc</title></head> <body><div id="my-div" /></body></html>`); var document = jsDomDoc.window.document; var elem = document.getElementById("my-div"); console.log(elem); //returns null
Created from: https://npm.runkit.com/jsdom
Loading…

no comments

    sign in to comment