Skip to content
Snippets Groups Projects
Verified Commit 72d3321c authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: doc

parent 4094ec95
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ export { NodeRecursiveIterator }; ...@@ -22,7 +22,7 @@ export { NodeRecursiveIterator };
const isNodeListSymbol = Symbol("isNodeList"); const isNodeListSymbol = Symbol("isNodeList");
/** /**
* You can create the instance via the monster namespace `new Monster.Types.NodeRecursiveIterator()`. * Represents a recursive iterator for traversing nodes in a DOM tree.
* *
* @externalExample ../../example/types/noderecursiveiterator.mjs * @externalExample ../../example/types/noderecursiveiterator.mjs
* @license AGPLv3 * @license AGPLv3
...@@ -30,10 +30,11 @@ const isNodeListSymbol = Symbol("isNodeList"); ...@@ -30,10 +30,11 @@ const isNodeListSymbol = Symbol("isNodeList");
* @copyright schukai GmbH * @copyright schukai GmbH
* @memberOf Monster.Types * @memberOf Monster.Types
* @summary An iterator to run recursively through a tree of nodes * @summary An iterator to run recursively through a tree of nodes
* @extends Base
*/ */
class NodeRecursiveIterator extends Base { class NodeRecursiveIterator extends Base {
/** /**
* @param {Node} [data] * @param node
*/ */
constructor(node) { constructor(node) {
super(); super();
...@@ -46,6 +47,8 @@ class NodeRecursiveIterator extends Base { ...@@ -46,6 +47,8 @@ class NodeRecursiveIterator extends Base {
let n = new Node(); let n = new Node();
n.childNodes = children; n.childNodes = children;
this[isNodeListSymbol] = true; this[isNodeListSymbol] = true;
this[internalSymbol] = n;
return;
} }
this[internalSymbol] = validateInstance(node, Node); this[internalSymbol] = validateInstance(node, Node);
...@@ -78,7 +81,6 @@ class NodeRecursiveIterator extends Base { ...@@ -78,7 +81,6 @@ class NodeRecursiveIterator extends Base {
} }
} }
return;
}; };
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment