node: add lookupNamespaceURI method (NOT TESTED)

Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
Francis Bouvier
2023-09-28 18:22:39 +02:00
parent 8c0279bd1b
commit 09ddfd2a09
2 changed files with 14 additions and 0 deletions

View File

@@ -398,6 +398,15 @@ pub fn nodeLookupPrefix(node: *Node, namespace: ?[]const u8) ?[]const u8 {
return stringToData(s.?);
}
pub fn nodeLookupNamespaceURI(node: *Node, prefix: ?[]const u8) ?[]const u8 {
var s: ?*String = undefined;
_ = nodeVtable(node).dom_node_lookup_namespace.?(node, stringFromData(prefix.?), &s);
if (s == null) {
return null;
}
return stringToData(s.?);
}
pub fn nodeNormalize(node: *Node) void {
_ = nodeVtable(node).dom_node_normalize.?(node);
}