From 49ee5e4e68c18d3165c797aa00d513772dbdb379 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 3 Jan 2024 14:59:48 +0100 Subject: [PATCH] comment: return error on constructor Blocked by https://github.com/lightpanda-io/browsercore/issues/102 --- src/dom/comment.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/dom/comment.zig b/src/dom/comment.zig index c9baad26..289a7932 100644 --- a/src/dom/comment.zig +++ b/src/dom/comment.zig @@ -20,8 +20,19 @@ const parser = @import("../netsurf.zig"); const CharacterData = @import("character_data.zig").CharacterData; +// https://dom.spec.whatwg.org/#interface-comment pub const Comment = struct { pub const Self = parser.Comment; pub const prototype = *CharacterData; pub const mem_guarantied = true; + + // TODO add constructor, but I need to associate the new Comment + // with the current document global object... + // > The new Comment(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-comment-comment + pub fn constructor() !*parser.Comment { + return error.NotImplemented; + } };