1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:18:12 +00:00

LibWeb: Make DOMStringMap a LegacyPlatformObject

Since it has a custom named getter, it should have been this all along.
This commit is contained in:
Andreas Kling 2022-10-08 12:58:56 +02:00
parent 2c37df6241
commit 3a675a024a
2 changed files with 13 additions and 6 deletions

View file

@ -19,7 +19,7 @@ JS::NonnullGCPtr<DOMStringMap> DOMStringMap::create(DOM::Element& element)
}
DOMStringMap::DOMStringMap(DOM::Element& element)
: PlatformObject(Bindings::cached_web_prototype(element.realm(), "DOMStringMap"))
: LegacyPlatformObject(Bindings::cached_web_prototype(element.realm(), "DOMStringMap"))
, m_associated_element(element)
{
}
@ -183,4 +183,9 @@ bool DOMStringMap::delete_existing_named_property(String const& name)
return true;
}
JS::Value DOMStringMap::named_item_value(FlyString const& name) const
{
return js_string(vm(), determine_value_of_named_property(name));
}
}