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

Latest commit

 

History

History
31 lines (22 loc) · 1.86 KB

README.md

File metadata and controls

31 lines (22 loc) · 1.86 KB

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.