diff options
author | Luke <luke.wilde@live.co.uk> | 2020-08-31 14:08:10 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-31 23:05:10 +0200 |
commit | 8aabec1c94251b859f227dd2d6e69f7426117723 (patch) | |
tree | 3c77da7ce14aade0be0f8ddf7e0f344c1c64aef2 /Libraries/LibWeb/Bindings/WindowObject.cpp | |
parent | 1c8312fa507cb2478d372d93aab7f71586d448c2 (diff) | |
download | serenity-8aabec1c94251b859f227dd2d6e69f7426117723.zip |
LibWeb: Expose window.self and window.frames
"self" is a way to refer to the global object that will work in both
a window context and a web worker context.
"frames" apparently used to return a list of frame objects according
to MDN, but it now just returns the window object.
Diffstat (limited to 'Libraries/LibWeb/Bindings/WindowObject.cpp')
-rw-r--r-- | Libraries/LibWeb/Bindings/WindowObject.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Bindings/WindowObject.cpp b/Libraries/LibWeb/Bindings/WindowObject.cpp index b2843531a8..ff4a6cf45b 100644 --- a/Libraries/LibWeb/Bindings/WindowObject.cpp +++ b/Libraries/LibWeb/Bindings/WindowObject.cpp @@ -59,6 +59,8 @@ void WindowObject::initialize() GlobalObject::initialize(); define_property("window", this, JS::Attribute::Enumerable); + define_property("frames", this, JS::Attribute::Enumerable); + define_property("self", this, JS::Attribute::Enumerable); define_native_property("document", document_getter, document_setter, JS::Attribute::Enumerable); define_native_function("alert", alert); define_native_function("confirm", confirm); |