mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-18 01:48:10 +00:00
dom: no need to allocate mem for case insensitive equality
thanks to [std.ascii.eqlIgnoreCase](https://ziglang.org/documentation/master/std/#A;std:ascii.eqlIgnoreCase)
This commit is contained in:
@@ -50,9 +50,9 @@ pub const Document = struct {
|
||||
// the spec changed to return an HTMLCollection instead.
|
||||
// That's why we reimplemented getElementsByTagName by using an
|
||||
// HTMLCollection in zig here.
|
||||
pub fn _getElementsByTagName(self: *parser.Document, allocator: std.mem.Allocator, tag_name: []const u8) !collection.HTMLCollection {
|
||||
pub fn _getElementsByTagName(self: *parser.Document, tag_name: []const u8) !collection.HTMLCollection {
|
||||
const root = parser.documentGetDocumentElement(self);
|
||||
return collection.HTMLCollectionByTagName(allocator, parser.elementToNode(root), tag_name);
|
||||
return collection.HTMLCollectionByTagName(parser.elementToNode(root), tag_name);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user