From 2679175ae9ba81c30ec8fbc5df4f096d94b49a1c Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Sat, 10 Jan 2026 16:00:11 +0800 Subject: [PATCH] make createElement return DOMException on error --- src/browser/webapi/Document.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/webapi/Document.zig b/src/browser/webapi/Document.zig index e2ae52ab..96ce7f03 100644 --- a/src/browser/webapi/Document.zig +++ b/src/browser/webapi/Document.zig @@ -934,8 +934,8 @@ pub const JsApi = struct { pub const compatMode = bridge.accessor(Document.getCompatMode, null, .{}); pub const referrer = bridge.accessor(Document.getReferrer, null, .{}); pub const domain = bridge.accessor(Document.getDomain, null, .{}); - pub const createElement = bridge.function(Document.createElement, .{}); - pub const createElementNS = bridge.function(Document.createElementNS, .{}); + pub const createElement = bridge.function(Document.createElement, .{.dom_exception = true}); + pub const createElementNS = bridge.function(Document.createElementNS, .{.dom_exception = true}); pub const createDocumentFragment = bridge.function(Document.createDocumentFragment, .{}); pub const createComment = bridge.function(Document.createComment, .{}); pub const createTextNode = bridge.function(Document.createTextNode, .{});