mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +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
|
@ -317,7 +317,7 @@ JS::ThrowCompletionOr<bool> is_named_property_exposed_on_object(Variant<Bindings
|
|||
|
||||
// 1. If P is not a supported property name of O, then return false.
|
||||
// NOTE: This is in it's own variable to enforce the type.
|
||||
Vector<String> supported_property_names = variant.visit([](auto* o) { return o->supported_property_names(); });
|
||||
auto supported_property_names = variant.visit([](auto* o) { return o->supported_property_names(); });
|
||||
auto property_key_string = MUST(String::from_byte_string(property_key.to_string()));
|
||||
if (!supported_property_names.contains_slow(property_key_string))
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue