New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

jsdom-web

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdom-web

3,6kb web implementation of some jsdom features, to give you the same API

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

jsdom-web

3,6kb web implementation of some jsdom features, to give you the same API

NOTE: Only most important features are implemented. The goal of this is to provide a lightweight implementation of the core jsdom API for the web, without implementing an own serializer and instead using the native document.createElement() and document.createTextNode() methods.

Usage

Put the code from this site at the top of your code

// JSDOM is already available in the global scope
const dom = new JSDOM('<div id="my-div">Hello World</div>');
const div = dom.window.document.getElementById('my-div');
console.log(div.textContent); // 'Hello World'

Keywords

jsdom

FAQs

Package last updated on 27 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts