mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-14 22:31:56 +00:00
LibWeb: Let supported_property_names() return Vector<FlyString>
Ultimately, this API should probably be replaced with something that updates a cache on relevant DOM mutations instead of regenerating the list of property names again and again.
This commit is contained in:
parent
0178929387
commit
41f56b0df9
Notes:
sideshowbarker
2024-07-17 07:06:47 +09:00
Author: https://github.com/awesomekling
Commit: 41f56b0df9
Pull-request: https://github.com/SerenityOS/serenity/pull/22422
19 changed files with 42 additions and 48 deletions
|
@ -1548,7 +1548,7 @@ OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> Window::document_tree_child_
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#named-access-on-the-window-object
|
||||
Vector<String> Window::supported_property_names()
|
||||
Vector<FlyString> Window::supported_property_names()
|
||||
{
|
||||
// The Window object supports named properties.
|
||||
// The supported property names of a Window object window at any moment consist of the following,
|
||||
|
@ -1575,13 +1575,7 @@ Vector<String> Window::supported_property_names()
|
|||
return IterationDecision::Continue;
|
||||
});
|
||||
|
||||
Vector<String> names;
|
||||
names.ensure_capacity(property_names.size());
|
||||
for (auto const& name : property_names) {
|
||||
names.append(name.to_string());
|
||||
}
|
||||
|
||||
return names;
|
||||
return property_names.values();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#named-access-on-the-window-object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue