1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

LibWeb: Implement a very basic WebAssembly JS API

This impl is *extremely* simple, and is missing a lot of things, it's
also not particularly spec-compliant in some places, but it's definitely
a start :^)
This commit is contained in:
Ali Mohammad Pur 2021-05-17 00:16:44 +04:30 committed by Ali Mohammad Pur
parent bdd7741ae1
commit a2af04837e
5 changed files with 450 additions and 1 deletions

View file

@ -27,6 +27,7 @@
#include <LibWeb/DOM/Window.h>
#include <LibWeb/Origin.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/WebAssembly/WebAssemblyObject.h>
#include <LibWeb/Bindings/WindowObjectHelper.h>
@ -72,6 +73,9 @@ void WindowObject::initialize_global_object()
define_property("navigator", heap().allocate<NavigatorObject>(*this, *this), JS::Attribute::Enumerable | JS::Attribute::Configurable);
define_property("location", heap().allocate<LocationObject>(*this, *this), JS::Attribute::Enumerable | JS::Attribute::Configurable);
// WebAssembly "namespace"
define_property("WebAssembly", heap().allocate<WebAssemblyObject>(*this, *this), JS::Attribute::Enumerable | JS::Attribute::Configurable);
ADD_WINDOW_OBJECT_INTERFACES;
}