1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 12:57:36 +00:00

LibWeb: Introduce the WebGL namespace and add WebGLContextEvent

This commit is contained in:
Luke Wilde 2022-06-04 04:18:32 +01:00 committed by Linus Groh
parent 7d1fcb0cb3
commit b0c2aee2e4
8 changed files with 74 additions and 1 deletions

View file

@ -17,6 +17,7 @@
#include <LibWeb/Bindings/ProgressEventWrapper.h>
#include <LibWeb/Bindings/PromiseRejectionEventWrapper.h>
#include <LibWeb/Bindings/SubmitEventWrapper.h>
#include <LibWeb/Bindings/WebGLContextEventWrapper.h>
namespace Web::Bindings {
@ -47,6 +48,8 @@ EventWrapper* wrap(JS::GlobalObject& global_object, DOM::Event& event)
return static_cast<ProgressEventWrapper*>(wrap_impl(global_object, static_cast<XHR::ProgressEvent&>(event)));
if (is<UIEvents::UIEvent>(event))
return static_cast<UIEventWrapper*>(wrap_impl(global_object, static_cast<UIEvents::UIEvent&>(event)));
if (is<WebGL::WebGLContextEvent>(event))
return static_cast<WebGLContextEventWrapper*>(wrap_impl(global_object, static_cast<WebGL::WebGLContextEvent&>(event)));
return static_cast<EventWrapper*>(wrap_impl(global_object, event));
}

View file

@ -339,6 +339,8 @@
#include <LibWeb/Bindings/URLPrototype.h>
#include <LibWeb/Bindings/URLSearchParamsConstructor.h>
#include <LibWeb/Bindings/URLSearchParamsPrototype.h>
#include <LibWeb/Bindings/WebGLContextEventConstructor.h>
#include <LibWeb/Bindings/WebGLContextEventPrototype.h>
#include <LibWeb/Bindings/WebSocketConstructor.h>
#include <LibWeb/Bindings/WebSocketPrototype.h>
#include <LibWeb/Bindings/WindowConstructor.h>
@ -526,6 +528,7 @@
ADD_WINDOW_OBJECT_INTERFACE(UIEvent) \
ADD_WINDOW_OBJECT_INTERFACE(URLSearchParams) \
ADD_WINDOW_OBJECT_INTERFACE(URL) \
ADD_WINDOW_OBJECT_INTERFACE(WebGLContextEvent) \
ADD_WINDOW_OBJECT_INTERFACE(WebSocket) \
ADD_WINDOW_OBJECT_INTERFACE(Worker) \
ADD_WINDOW_OBJECT_INTERFACE(XMLHttpRequest) \