瀏覽代碼

LibWeb: Expose the global object as "window"

Andreas Kling 5 年之前
父節點
當前提交
b3c62d0bc8
共有 1 個文件被更改,包括 1 次插入0 次删除
  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)
     : m_impl(impl)
 {
+    put("window", this);
     put_native_property("document", document_getter, document_setter);
     put_native_function("alert", alert);
     put_native_function("setInterval", set_interval, 1);