From eef2fa94d018b5b3e57be46ff7211b67f6c43eeb Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 3 Jan 2024 15:03:04 +0100 Subject: [PATCH] text: return error on constructor Blocked by #102 --- src/dom/text.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/dom/text.zig b/src/dom/text.zig index a64c4d88..32e9c20f 100644 --- a/src/dom/text.zig +++ b/src/dom/text.zig @@ -38,6 +38,16 @@ pub const Text = struct { pub const prototype = *CharacterData; pub const mem_guarantied = true; + // TODO add constructor, but I need to associate the new Text + // with the current document global object... + // > The new Text(data) constructor steps are to set this’s data to data + // > and this’s node document to current global object’s associated + // > Document. + // https://dom.spec.whatwg.org/#dom-text-text + pub fn constructor() !*parser.Comment { + return error.NotImplemented; + } + // JS funcs // --------