mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
document.documentElement returns a *parser.Element
For XML documents, the documentElement could be another element than HTMLElement. So we don't want to pass to through the toInterface.
This commit is contained in:
@@ -66,10 +66,8 @@ pub const Document = struct {
|
||||
return DOMImplementation{};
|
||||
}
|
||||
|
||||
pub fn get_documentElement(self: *parser.Document) !?ElementUnion {
|
||||
const e = try parser.documentGetDocumentElement(self);
|
||||
if (e == null) return null;
|
||||
return try Element.toInterface(e.?);
|
||||
pub fn get_documentElement(self: *parser.Document) !?*parser.Element {
|
||||
return try parser.documentGetDocumentElement(self);
|
||||
}
|
||||
|
||||
pub fn get_documentURI(self: *parser.Document) ![]const u8 {
|
||||
|
||||
Reference in New Issue
Block a user