Socket
Socket
Sign inDemoInstall

@hint/utils-dom

Package Overview
Dependencies
17
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hint/utils-dom

utils for DOM


Version published
Maintainers
5
Install size
1.27 MB
Created

Readme

Source

DOM utils (@hint/utils-dom)

Set of helpers to process DOM. Supports parsing HTML into a light-weight implementation of a subset of DOM standards APIs.

Installation

This package is installed automatically when adding webhint to your project so running the following is enough:

npm install hint --save-dev

Utils

  • createHelpers: Inject and invoke within the context of a page to generate global webhint helpers for creating DOM snapshots and resolving unique IDs to Nodes.
  • createHTMLDocument: Create an HTMLDocument object from an string.
  • findOriginalElement: Perform a best-effort search to find an element in the provided document which is likely the original source for the provided element. Used to resolve element locations to the original HTML when possible.
  • getElementByUrl: Get an HTMLElement given a URL.
  • getHTMLCodeSnippet: Generate a Snippet code for a HTMLElement.
  • populateGlobals: Inject DOM APIs into the provided global context.
  • traverse: Traverse an HTMLDocument.
  • restoreReferences: Rebuild parent and sibling references in a DOM snapshot.

Keywords

FAQs

Last updated on 09 Jun 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc