Coverage Report

Created: 2026-10-28 07:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/HTML/BeforeUnloadEvent.cpp
Line
Count
Source
1
/*
2
 * Copyright (c) 2024, Tim Ledbetter <tim.ledbetter@ladybird.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#include <LibWeb/Bindings/BeforeUnloadEventPrototype.h>
8
#include <LibWeb/Bindings/Intrinsics.h>
9
#include <LibWeb/HTML/BeforeUnloadEvent.h>
10
11
namespace Web::HTML {
12
13
JS_DEFINE_ALLOCATOR(BeforeUnloadEvent);
14
15
JS::NonnullGCPtr<BeforeUnloadEvent> BeforeUnloadEvent::create(JS::Realm& realm, FlyString const& event_name, DOM::EventInit const& event_init)
16
0
{
17
0
    return realm.heap().allocate<BeforeUnloadEvent>(realm, realm, event_name, event_init);
18
0
}
19
20
BeforeUnloadEvent::BeforeUnloadEvent(JS::Realm& realm, FlyString const& event_name, DOM::EventInit const& event_init)
21
0
    : DOM::Event(realm, event_name, event_init)
22
0
{
23
0
}
24
25
0
BeforeUnloadEvent::~BeforeUnloadEvent() = default;
26
27
void BeforeUnloadEvent::initialize(JS::Realm& realm)
28
0
{
29
0
    Base::initialize(realm);
30
0
    WEB_SET_PROTOTYPE_FOR_INTERFACE(BeforeUnloadEvent);
31
0
}
32
33
}