mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
LibWeb: Use FlyString in Document::get_elements_by_name
This commit is contained in:
parent
2a94cddb02
commit
bd2fe3dcaa
Notes:
sideshowbarker
2024-07-17 20:19:08 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/bd2fe3dcaa Pull-request: https://github.com/SerenityOS/serenity/pull/22732
@ -1250,7 +1250,7 @@ void Document::set_hovered_node(Node* node)
|
||||
}
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<HTMLCollection> Document::get_elements_by_name(String const& name)
|
||||
JS::NonnullGCPtr<HTMLCollection> Document::get_elements_by_name(FlyString const& name)
|
||||
{
|
||||
return HTMLCollection::create(*this, HTMLCollection::Scope::Descendants, [name](Element const& element) {
|
||||
return element.name() == name;
|
||||
|
@ -219,7 +219,7 @@ public:
|
||||
void schedule_style_update();
|
||||
void schedule_layout_update();
|
||||
|
||||
JS::NonnullGCPtr<HTMLCollection> get_elements_by_name(String const&);
|
||||
JS::NonnullGCPtr<HTMLCollection> get_elements_by_name(FlyString const&);
|
||||
JS::NonnullGCPtr<HTMLCollection> get_elements_by_class_name(StringView);
|
||||
|
||||
JS::NonnullGCPtr<HTMLCollection> applets();
|
||||
|
@ -58,7 +58,7 @@ interface Document : Node {
|
||||
readonly attribute Element? activeElement;
|
||||
|
||||
Element? getElementById(DOMString id);
|
||||
HTMLCollection getElementsByName(DOMString name);
|
||||
HTMLCollection getElementsByName([FlyString] DOMString name);
|
||||
HTMLCollection getElementsByTagName(DOMString tagName);
|
||||
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
||||
HTMLCollection getElementsByClassName(DOMString className);
|
||||
|
Loading…
Reference in New Issue
Block a user