domnode-at-path

Supply a path and a root node and receive the node at that path.

Usage no npm install needed!

<script type="module">
  import domnodeAtPath from 'https://cdn.skypack.dev/domnode-at-path';
</script>

README

DOMNode at path

nodeAt(path:Array, rootNode:DOMNode)

  • path is an array, where [] is the root node, [0] is the first child node and [0,1] is the second child of the first child of the root node.
  • rootNode is the reference in respect to which the paths are resolved

Legal

(c) 2016 by Marcel Klehr

MIT-License