mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 14:54:57 +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
19 changed files with 42 additions and 48 deletions
|
@ -91,13 +91,13 @@ Vector<DOMStringMap::NameValuePair> DOMStringMap::get_name_value_pairs() const
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#concept-domstringmap-pairs
|
||||
// NOTE: There isn't a direct link to this, so the link is to one of the algorithms above it.
|
||||
Vector<String> DOMStringMap::supported_property_names() const
|
||||
Vector<FlyString> DOMStringMap::supported_property_names() const
|
||||
{
|
||||
// The supported property names on a DOMStringMap object at any instant are the names of each pair returned from getting the DOMStringMap's name-value pairs at that instant, in the order returned.
|
||||
Vector<String> names;
|
||||
Vector<FlyString> names;
|
||||
auto name_value_pairs = get_name_value_pairs();
|
||||
for (auto& name_value_pair : name_value_pairs) {
|
||||
names.append(name_value_pair.name.to_string());
|
||||
names.append(name_value_pair.name);
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue