dom: rename HTMLCollection._next() into get_next()

We don't want expose the function to the JS API.
This commit is contained in:
Pierre Tachoire
2023-10-27 18:02:44 +02:00
parent 84934cca13
commit 9bb200a46f

View File

@@ -27,7 +27,7 @@ pub const HTMLCollection = struct {
// next iterates hover the DOM tree to return the next following node or // next iterates hover the DOM tree to return the next following node or
// null at the end. // null at the end.
fn _next(root: *parser.Node, cur: *parser.Node) ?*parser.Node { fn get_next(root: *parser.Node, cur: *parser.Node) ?*parser.Node {
// TODO deinit next // TODO deinit next
var next = parser.nodeFirstChild(cur); var next = parser.nodeFirstChild(cur);
if (next != null) { if (next != null) {
@@ -86,7 +86,7 @@ pub const HTMLCollection = struct {
} }
} }
node = _next(self.root, node) orelse break; node = get_next(self.root, node) orelse break;
} }
return len; return len;
@@ -130,7 +130,7 @@ pub const HTMLCollection = struct {
} }
} }
node = _next(self.root, node) orelse break; node = get_next(self.root, node) orelse break;
} }
return null; return null;
@@ -174,7 +174,7 @@ pub const HTMLCollection = struct {
} }
} }
node = _next(self.root, node) orelse break; node = get_next(self.root, node) orelse break;
} }
return null; return null;