comment: return error on constructor

Blocked by https://github.com/lightpanda-io/browsercore/issues/102
This commit is contained in:
Pierre Tachoire committed 2024-05-22 14:45:39 +02:00
1 parent b7f589ee1a
commit 49ee5e4e68
1 file changed
+11
+11
View File
@@ -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;
}
};