1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

LibWeb: Add basic constructor/prototype to exotic objects

This commit is contained in:
Igor Pissolati 2022-04-05 17:54:04 -03:00 committed by Andreas Kling
parent 1d080e1cda
commit a387b822a0
14 changed files with 307 additions and 3 deletions

View file

@ -35,6 +35,7 @@
#include <LibWeb/Bindings/StorageWrapper.h>
#include <LibWeb/Bindings/WindowObject.h>
#include <LibWeb/Bindings/WindowObjectHelper.h>
#include <LibWeb/Bindings/WindowPrototype.h>
#include <LibWeb/Crypto/Crypto.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
@ -59,7 +60,7 @@ void WindowObject::initialize_global_object()
{
Base::initialize_global_object();
Object::set_prototype(&ensure_web_prototype<EventTargetPrototype>("EventTarget"));
Object::set_prototype(&ensure_web_prototype<WindowPrototype>("Window"));
// FIXME: These should be native accessors, not properties
define_direct_property("window", this, JS::Attribute::Enumerable);