@actualwave/dom-walker

Library build on TreeWalker for traversing HTML DOM.

Usage no npm install needed!

<script type="module">
  import actualwaveDomWalker from 'https://cdn.skypack.dev/@actualwave/dom-walker';
</script>

README

DOM Walker

Library build on ES6 Proxies using TreeWalker in its core for traversing HTML DOM. Uses BrowserDOM adapter and adds augmentations to work with HTML elements. For more information check TreeWalker documentation.

Usage

From set of TreeWalker API, DOMWalker exports only

  • addAugmentations() -- add more augmentations.
  • resetAugmentations() -- reset augmentations.
  • setNamePrefix() -- add more or change prefixes
  • create() -- accepts two optional arguments for root node of the tree and adapter which is set by default to BrowserDOM adapter.

DEMO

Demo of DOMWalker available here, in comparison you may check demo of DOMWalker built by parts