Skip to content

Commit 22c6729

Browse files
Update src/browser/dom/document.zig
Co-authored-by: Sjors <[email protected]>
1 parent f20457c commit 22c6729

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/browser/dom/document.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ pub const Document = struct {
248248

249249
pub fn get_activeElement(doc: *parser.Document, page: *Page) !?ElementUnion {
250250
const HTMLDocument = @import("../html/document.zig").HTMLDocument;
251-
const html_doc = try page.getOrCreateNodeWrapper(HTMLDocument, @ptrCast(doc));
251+
const doc_elem = try parser.documentGetDocumentElement(doc);
252+
const html_doc = try page.getOrCreateNodeWrapper(HTMLDocument, @ptrCast(doc_elem));
252253
if (html_doc.active_element) |ae| {
253254
return try Element.toInterface(ae);
254255
}

0 commit comments

Comments
 (0)