css: add matcher test w/ libdom

This commit is contained in:
Pierre Tachoire
2024-03-18 09:49:12 +01:00
parent b59fd9b1fb
commit 954a693586
4 changed files with 60 additions and 5 deletions

View File

@@ -13,10 +13,14 @@ pub const Node = struct {
return null;
}
pub fn nextSibling(n: Node) ?Node {
pub fn nextSibling(n: Node) !?Node {
const c = try parser.nodeNextSibling(n.node);
if (c) |cc| return .{ .node = cc };
return null;
}
pub fn tag(n: Node) ![]const u8 {
return try parser.nodeName(n.node);
}
};