path-to-domnode
v1.0.1
Published
A root node and a descendant and receive the path to the specified node.
Downloads
25
Readme
path to DOMNode
pathTo(node:DOMNode, rootNode:DOMNode)
node
is a descendant of rootNode.rootNode
is the reference in respect to which the paths are resolved- returns 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
See also
Legal
(c) 2016 by Marcel Klehr
MIT-License