mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
dom: implement document.createDocumentFragment
This commit is contained in:
21
src/dom/document_fragment.zig
Normal file
21
src/dom/document_fragment.zig
Normal file
@@ -0,0 +1,21 @@
|
||||
const std = @import("std");
|
||||
|
||||
const parser = @import("../netsurf.zig");
|
||||
|
||||
const Node = @import("node.zig").Node;
|
||||
|
||||
// WEB IDL https://dom.spec.whatwg.org/#documentfragment
|
||||
pub const DocumentFragment = struct {
|
||||
pub const Self = parser.DocumentFragment;
|
||||
pub const prototype = *Node;
|
||||
pub const mem_guarantied = true;
|
||||
|
||||
// TODO add constructor, but I need to associate the new DocumentFragment
|
||||
// with the current document global object...
|
||||
// > The new DocumentFragment() constructor steps are to set this’s node
|
||||
// > document to current global object’s associated Document.
|
||||
// https://dom.spec.whatwg.org/#dom-documentfragment-documentfragment
|
||||
pub fn constructor() !*parser.DocumentFragment {
|
||||
return error.NotImplemented;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user