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

@@ -18,15 +18,15 @@ pub const Text = struct {
// Read attributes
pub fn get_wholeText(self: *parser.Text) []const u8 {
return parser.textWholdeText(self);
pub fn get_wholeText(self: *parser.Text) ![]const u8 {
return try parser.textWholdeText(self);
}
// JS methods
// ----------
pub fn _splitText(self: *parser.Text, offset: u32) *parser.Text {
return parser.textSplitText(self, offset);
pub fn _splitText(self: *parser.Text, offset: u32) !*parser.Text {
return try parser.textSplitText(self, offset);
}
};