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:
@@ -998,6 +998,9 @@ pub const Track = struct { base: *c.dom_html_element };
|
||||
pub const UList = c.dom_html_u_list_element;
|
||||
pub const Video = struct { base: *c.dom_html_element };
|
||||
|
||||
// Document Fragment
|
||||
pub const DocumentFragment = c.dom_document_fragment;
|
||||
|
||||
// Document Position
|
||||
|
||||
pub const DocumentPosition = enum(u2) {
|
||||
@@ -1177,6 +1180,13 @@ pub inline fn documentGetDoctype(doc: *Document) !?*DocumentType {
|
||||
return dt;
|
||||
}
|
||||
|
||||
pub inline fn documentCreateDocumentFragment(doc: *Document) !*DocumentFragment {
|
||||
var df: ?*DocumentFragment = undefined;
|
||||
const err = documentVtable(doc).dom_document_create_document_fragment.?(doc, &df);
|
||||
try DOMErr(err);
|
||||
return df.?;
|
||||
}
|
||||
|
||||
// DocumentHTML
|
||||
pub const DocumentHTML = c.dom_html_document;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user