HTMLDocument: implement all getter

This commit is contained in:
Pierre Tachoire
2024-01-05 10:28:09 +01:00
parent fce9e44407
commit c73ecb5e0d
2 changed files with 17 additions and 0 deletions

View File

@@ -167,6 +167,18 @@ pub fn HTMLCollectionByName(
};
}
pub fn HTMLCollectionAll(
root: ?*parser.Node,
include_root: bool,
) !HTMLCollection {
return HTMLCollection{
.root = root,
.walker = Walker{ .walkerDepthFirst = .{} },
.matcher = Matcher{ .matchTrue = .{} },
.include_root = include_root,
};
}
pub fn HTMLCollectionChildren(
root: ?*parser.Node,
include_root: bool,