Skip to content

Commit 49ee5e4

Browse files
committed
comment: return error on constructor
Blocked by #102
1 parent b7f589e commit 49ee5e4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/dom/comment.zig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,19 @@ const parser = @import("../netsurf.zig");
2020

2121
const CharacterData = @import("character_data.zig").CharacterData;
2222

23+
// https://dom.spec.whatwg.org/#interface-comment
2324
pub const Comment = struct {
2425
pub const Self = parser.Comment;
2526
pub const prototype = *CharacterData;
2627
pub const mem_guarantied = true;
28+
29+
// TODO add constructor, but I need to associate the new Comment
30+
// with the current document global object...
31+
// > The new Comment(data) constructor steps are to set this’s data to data
32+
// > and this’s node document to current global object’s associated
33+
// > Document.
34+
// https://dom.spec.whatwg.org/#dom-comment-comment
35+
pub fn constructor() !*parser.Comment {
36+
return error.NotImplemented;
37+
}
2738
};

0 commit comments

Comments
 (0)