mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-17 00:38:59 +00:00
dom: create elementToNode helper
This commit is contained in:
@@ -45,9 +45,9 @@ pub const Document = struct {
|
||||
// That's why we reimplemented getElementsByTagName by using an
|
||||
// HTMLCollection in zig here.
|
||||
pub fn _getElementsByTagName(self: *parser.Document, tag_name: []const u8) HTMLCollection {
|
||||
const root = parser.documentGetDocumentNode(self);
|
||||
const root = parser.documentGetDocumentElement(self);
|
||||
return HTMLCollection{
|
||||
.root = root,
|
||||
.root = parser.elementToNode(root),
|
||||
.match = tag_name,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user