Skip to content

Commit d6640f4

Browse files
committed
Revert "document.documentElement returns a *parser.Element"
This reverts commit c1752ae.
1 parent ce08cc9 commit d6640f4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/browser/dom/document.zig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ pub const Document = struct {
6666
return DOMImplementation{};
6767
}
6868

69-
pub fn get_documentElement(self: *parser.Document) !?*parser.Element {
70-
return try parser.documentGetDocumentElement(self);
69+
pub fn get_documentElement(self: *parser.Document) !?ElementUnion {
70+
const e = try parser.documentGetDocumentElement(self);
71+
if (e == null) return null;
72+
return try Element.toInterface(e.?);
7173
}
7274

7375
pub fn get_documentURI(self: *parser.Document) ![]const u8 {

0 commit comments

Comments
 (0)