Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

JavaScript implementation of W3 DOM4 TreeWalker interface for browsers supporting ECMAScript 3 or higher.

License

Notifications You must be signed in to change notification settings

Krinkle/dom-TreeWalker-polyfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code coverage Tested with QUnit

DOM TreeWalker polyfill

JavaScript implementation of W3 DOM4 TreeWalker interface for browsers supporting ECMAScript 3 or higher.

Specification

TreeWalker:

document.createTreeWalker:

During the development of this polyfill, I noticed a defect in the WHATWG DOM specification (patch 1, patch 2). The finding is acknowledged at https://dom.spec.whatwg.org/#acks.

Tests

By default the tests run against the code in src/. Any native TreeWalker implementation is disabled as part of the test set up.

  • To test the native implementation, run UNIT_USE_NATIVE=true npm test.
  • To test the minified version, run UNIT_USE_MIN=true npm test.
  • Both, run UNIT_USE_MIN=true UNIT_USE_NATIVE=true npm test.
  • To debug tests in your browser (instead of Headless), use npm run karma-debug. Then press the "Debug" button in the browser window to start the tests.

About

JavaScript implementation of W3 DOM4 TreeWalker interface for browsers supporting ECMAScript 3 or higher.

Resources

License

Stars

Watchers

Forks