2.2.4 • Published 11 months ago

@hint/utils-dom v2.2.4

Weekly downloads
3,754
License
Apache-2.0
Repository
github
Last release
11 months ago

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.
2.2.4

11 months ago

2.2.3

1 year ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.12

2 years ago

2.1.13

2 years ago

2.1.11

2 years ago

2.1.10

2 years ago

2.1.9

2 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago