mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibWeb: Add basic constructor/prototype to exotic objects
This commit is contained in:
parent
1d080e1cda
commit
a387b822a0
Notes:
sideshowbarker
2024-07-17 14:22:29 +09:00
Author: https://github.com/Igoorx
Commit: a387b822a0
Pull-request: https://github.com/SerenityOS/serenity/pull/13534
14 changed files with 307 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue