mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-02 01:15:00 -04:00
add indexed_get to namednodemap
This commit is contained in:
1 parent
66ec087416
commit
42bc80e5b5
1 file changed
+7
@@ -70,6 +70,13 @@ pub const NamedNodeMap = struct {
|
||||
) !*parser.Attribute {
|
||||
return try parser.namedNodeMapRemoveNamedItemNS(self, namespace, localname);
|
||||
}
|
||||
|
||||
pub fn indexed_get(self: *parser.NamedNodeMap, index: u32, has_value: *bool) !*parser.Attribute {
|
||||
return (try NamedNodeMap._item(self, index)) orelse {
|
||||
has_value.* = false;
|
||||
return undefined;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// Tests
|
||||
|
||||
Reference in new issue
Block a user