1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 21:55:07 +00:00

LibWeb: Insert WindowProperties object into Window's prototype chain

And implement WindowProperties, the "named properties object" for Window
according to the spec.

This involves moving an AO out of LegacyPlatformObject and into a common
place that the WindowProperties class can access.

This doesn't implement the AOs on Window that actually name lookup for
the unenumerable named properties on the window yet, just the
scaffolding.
This commit is contained in:
Andrew Kaster 2023-09-19 13:32:13 -06:00 committed by Andrew Kaster
parent 64899dba44
commit 247f12d7b0
12 changed files with 313 additions and 57 deletions

View file

@ -1437,4 +1437,16 @@ OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> Window::document_tree_child_
return names;
}
// https://html.spec.whatwg.org/#named-access-on-the-window-object
Vector<DeprecatedString> Window::supported_property_names()
{
return {};
}
// https://html.spec.whatwg.org/#named-access-on-the-window-object
WebIDL::ExceptionOr<JS::Value> Window::named_item_value(DeprecatedFlyString const& name)
{
return JS::js_undefined();
}
}