text-fragments-ts/lib/ common.js
10 lines
349 B

  1. export function nextNode(node) {
  2. var _a;
  3. const walker = ((_a = node.ownerDocument) !== null && _a !== void 0 ? _a : node).createTreeWalker(node.getRootNode());
  4. walker.currentNode = node;
  5. return walker.nextNode();
  6. }
  7. export function isElement(node) {
  8. return node.nodeType === Node.ELEMENT_NODE;
  9. }
  10. //# sourceMappingURL=common.js.map