浏览器环境导入包:
const jsdom = require('jsdom')
const { JSDOM } =jsdom
const dom =new JSDOM('<! doctype html><p>hello</p>')
window=dom.window
document=window.document
navigator=window.navigator
浏览器环境导入包:
const jsdom = require('jsdom')
const { JSDOM } =jsdom
const dom =new JSDOM('<! doctype html><p>hello</p>')
window=dom.window
document=window.document
navigator=window.navigator