Browse Source

LibWeb: Expose the global object as "window"

Andreas Kling 5 years ago
parent
commit
b3c62d0bc8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Libraries/LibWeb/Bindings/WindowObject.cpp

+ 1 - 0
Libraries/LibWeb/Bindings/WindowObject.cpp

@@ -41,6 +41,7 @@ namespace Bindings {
 WindowObject::WindowObject(Window& impl)
 WindowObject::WindowObject(Window& impl)
     : m_impl(impl)
     : m_impl(impl)
 {
 {
+    put("window", this);
     put_native_property("document", document_getter, document_setter);
     put_native_property("document", document_getter, document_setter);
     put_native_function("alert", alert);
     put_native_function("alert", alert);
     put_native_function("setInterval", set_interval, 1);
     put_native_function("setInterval", set_interval, 1);