comment: return error on constructor

Blocked by https://github.com/lightpanda-io/browsercore/issues/102
This commit is contained in:
Pierre Tachoire
2024-01-03 14:59:48 +01:00
parent b7f589ee1a
commit 49ee5e4e68

View File

@@ -20,8 +20,19 @@ const parser = @import("../netsurf.zig");
const CharacterData = @import("character_data.zig").CharacterData; const CharacterData = @import("character_data.zig").CharacterData;
// https://dom.spec.whatwg.org/#interface-comment
pub const Comment = struct { pub const Comment = struct {
pub const Self = parser.Comment; pub const Self = parser.Comment;
pub const prototype = *CharacterData; pub const prototype = *CharacterData;
pub const mem_guarantied = true; 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 thiss data to data
// > and thiss node document to current global objects associated
// > Document.
// https://dom.spec.whatwg.org/#dom-comment-comment
pub fn constructor() !*parser.Comment {
return error.NotImplemented;
}
}; };