Skip to content

Commit

Permalink
Rename variable for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmaa committed Aug 23, 2024
1 parent 0d9d16e commit 416d862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/js/dom/dom-text-scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class DOMTextScanner {

/** @type {Node[]} */
const exitedNodes = [];
node = DOMTextScanner.getNextNode(node, forward, enterable, exitedNodes);
node = DOMTextScanner.getNextNodeToProcess(node, forward, enterable, exitedNodes);

for (const exitedNode of exitedNodes) {
if (exitedNode.nodeType !== ELEMENT_NODE) { continue; }
Expand Down Expand Up @@ -386,7 +386,7 @@ export class DOMTextScanner {
* @param {Node[]} exitedNodes An array which stores nodes which were exited.
* @returns {?Node} The next node in the document, or `null` if there is no next node.
*/
static getNextNode(node, forward, visitChildren, exitedNodes) {
static getNextNodeToProcess(node, forward, visitChildren, exitedNodes) {
/** @type {?Node} */
let next = visitChildren ? (forward ? node.firstChild : node.lastChild) : null;
if (next === null) {
Expand Down

0 comments on commit 416d862

Please sign in to comment.