Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
html-document
Advanced tools
Partial implementation of the DOM, document for node.
import Document from 'html-document'; // or var Document = require('html-document');
const document = new Document();
let textNode = document.createTextNode('Hello');
let h1 = document.createElement('h1');
h1.setAttribute('id', 'title');
h1.appendChild(textNode);
expect(h1.outerHTML, '<h1 id="title">Hello</h1>');
The partial implementation allows you to build html like you would in the browser, with the DOM API.
This library will never implement all specifications of the W3C.
See the generated API here.
Inject window
, document
, Document
, DocumentFragment
, Node
and Event
in the global scope.
import 'html-document/lib/global'; // or var Document = require('html-document/lib/global');
let textNode = document.createTextNode('Hello');
expect(textNode.textContent, 'Hello');
Create an HTML layout
let document = new Document();
let fragment = document.createDocumentFragment();
fragment.appendChild(new Doctype());
let html = document.createElement('html');
fragment.appendChild(html);
let head = document.createElement('head');
html.appendChild(head);
let body = document.createElement('body');
html.appendChild(body);
expect(fragment.innerHTML, '<!DOCTYPE html><html><head></head><body></body></html>');
v0.8.1
Update springbokjs-library
FAQs
Partial implementation of document, HTMLElement for node
The npm package html-document receives a total of 135 weekly downloads. As such, html-document popularity was classified as not popular.
We found that html-document demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.