0.1.2 • Published 3 years ago
dom-identifier v0.1.2
dom-identifier
An utility to retrieve a unique node path, and find it later on.
import {getNode, getPath} from 'dom-identifier';
const node = document.getElementById('any');
const path = getPath(node);
// [1, 34, 12, 7]
getNode(path) === node;
// true