1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +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

@ -37,6 +37,11 @@ interface Window : EventTarget {
readonly attribute Element? frameElement;
WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank", optional [LegacyNullToEmptyString] DOMString features = "");
// Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic
// object on the prototype chain. Indeed, this does not make the global object an exotic object.
// Indexed access is taken care of by the WindowProxy exotic object.
getter object (DOMString name);
// the user agent
readonly attribute Navigator navigator;
[ImplementedAs=navigator] readonly attribute Navigator clientInformation; // legacy alias of .navigator