Skip to content

elonehoo/dom-traversal

Repository files navigation

dom-traversal

NPM version

Iteratively walk any DOM node.

Install

# npm
npm install --save-dev @elonehoo/dom-traversal

# yarn
yarn add --dev @elonehoo/dom-traversal

# pnpm
pnpm install --save-dev @elonehoo/dom-traversal

Usage

import  iterativelyWalk  from '@elonehoo/dom-traversal'

iterativelyWalk(document.body.childNodes,function (node:Node){
  console.log("node", node)
})

License

MIT License © 2022-PRESENT Elone Hoo