dom: declare document.createElementsNS

This commit is contained in:
Pierre Tachoire
2023-11-16 15:48:54 +01:00
parent 05d31eb63e
commit 4a15456418
4 changed files with 424 additions and 0 deletions

View File

@@ -36,6 +36,11 @@ pub const Document = struct {
return Element.toInterface(e);
}
pub fn _createElementNS(self: *parser.Document, ns: []const u8, tag_name: []const u8) ElementUnion {
const e = parser.documentCreateElementNS(self, ns, tag_name);
return Element.toInterface(e);
}
// We can't simply use libdom dom_document_get_elements_by_tag_name here.
// Indeed, netsurf implemented a previous dom spec when
// getElementsByTagName returned a NodeList.