Coverage Report

Created: 2025-09-05 06:52

/src/serenity/Userland/Libraries/LibWeb/WebGL/WebGLContextEvent.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
3
 * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
4
 *
5
 * SPDX-License-Identifier: BSD-2-Clause
6
 */
7
8
#pragma once
9
10
#include <AK/FlyString.h>
11
#include <LibWeb/DOM/Event.h>
12
13
namespace Web::WebGL {
14
15
struct WebGLContextEventInit final : public DOM::EventInit {
16
    String status_message;
17
};
18
19
class WebGLContextEvent final : public DOM::Event {
20
    WEB_PLATFORM_OBJECT(WebGLContextEvent, DOM::Event);
21
    JS_DECLARE_ALLOCATOR(WebGLContextEvent);
22
23
public:
24
    [[nodiscard]] static JS::NonnullGCPtr<WebGLContextEvent> create(JS::Realm&, FlyString const& type, WebGLContextEventInit const&);
25
    static WebIDL::ExceptionOr<JS::NonnullGCPtr<WebGLContextEvent>> construct_impl(JS::Realm&, FlyString const& type, WebGLContextEventInit const&);
26
27
    virtual ~WebGLContextEvent() override;
28
29
0
    String const& status_message() const { return m_status_message; }
30
31
private:
32
    WebGLContextEvent(JS::Realm&, FlyString const& type, WebGLContextEventInit const& event_init);
33
34
    virtual void initialize(JS::Realm&) override;
35
36
    String m_status_message;
37
};
38
39
}