dom: add document.doctype getter

This commit is contained in:
Pierre Tachoire
2023-11-20 15:24:23 +01:00
parent 5ac6a286fc
commit a64d920f11
3 changed files with 33 additions and 0 deletions

View File

@@ -783,6 +783,12 @@ pub inline fn documentCreateElementNS(doc: *Document, ns: []const u8, tag_name:
return elem.?;
}
pub inline fn documentGetDoctype(doc: *Document) ?*DocumentType {
var dt: ?*DocumentType = undefined;
_ = documentVtable(doc).dom_document_get_doctype.?(doc, &dt);
return dt;
}
// DocumentHTML
pub const DocumentHTML = c.dom_html_document;