mirror of
				https://github.com/lightpanda-io/browser.git
				synced 2025-10-30 07:31:47 +00:00 
			
		
		
		
	Merge pull request #548 from lightpanda-io/namednodemap_indexed_get
add indexed_get to namednodemap
This commit is contained in:
		| @@ -70,6 +70,13 @@ pub const NamedNodeMap = struct { | |||||||
|     ) !*parser.Attribute { |     ) !*parser.Attribute { | ||||||
|         return try parser.namedNodeMapRemoveNamedItemNS(self, namespace, localname); |         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 | // Tests | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pierre Tachoire
					Pierre Tachoire