2022-06-04 04:18:32 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
|
2022-08-08 22:29:40 +02:00
|
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
2022-06-04 04:18:32 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/DOM/Event.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::WebGL {
|
|
|
|
|
|
|
|
|
|
struct WebGLContextEventInit final : public DOM::EventInit {
|
|
|
|
|
String status_message { String::empty() };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class WebGLContextEvent final : public DOM::Event {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(WebGLContextEvent, DOM::Event);
|
2022-08-08 22:29:40 +02:00
|
|
|
|
2022-06-04 04:18:32 +01:00
|
|
|
public:
|
2022-09-25 18:12:50 -06:00
|
|
|
static WebGLContextEvent* create(JS::Realm&, FlyString const& type, WebGLContextEventInit const& event_init);
|
|
|
|
|
static WebGLContextEvent* construct_impl(JS::Realm&, FlyString const& type, WebGLContextEventInit const& event_init);
|
2022-06-04 04:18:32 +01:00
|
|
|
|
2022-08-08 22:29:40 +02:00
|
|
|
virtual ~WebGLContextEvent() override;
|
2022-06-04 04:18:32 +01:00
|
|
|
|
|
|
|
|
String const& status_message() const { return m_status_message; }
|
|
|
|
|
|
|
|
|
|
private:
|
2022-09-25 18:12:50 -06:00
|
|
|
WebGLContextEvent(JS::Realm&, FlyString const& type, WebGLContextEventInit const& event_init);
|
|
|
|
|
|
2022-06-04 04:18:32 +01:00
|
|
|
String m_status_message { String::empty() };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|