Check DOMError

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2023-11-28 17:55:49 +01:00
parent 68db7f2e63
commit 2065d47d8e
15 changed files with 400 additions and 303 deletions

View File

@@ -12,14 +12,14 @@ pub const Element = struct {
pub const prototype = *Node;
pub const mem_guarantied = true;
pub fn toInterface(e: *parser.Element) Union {
return HTMLElem.toInterface(Union, e);
pub fn toInterface(e: *parser.Element) !Union {
return try HTMLElem.toInterface(Union, e);
}
// JS funcs
// --------
pub fn get_localName(self: *parser.Element) []const u8 {
return parser.elementLocalName(self);
pub fn get_localName(self: *parser.Element) ![]const u8 {
return try parser.elementLocalName(self);
}
};