Coverage Report

Created: 2025-08-28 06:26

/src/serenity/Userland/Libraries/LibWeb/HTML/FormDataEvent.cpp
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2023, Kenneth Myhra <kennethmyhra@serenityos.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#include <LibWeb/Bindings/FormDataEventPrototype.h>
8
#include <LibWeb/Bindings/Intrinsics.h>
9
#include <LibWeb/HTML/FormDataEvent.h>
10
11
namespace Web::HTML {
12
13
JS_DEFINE_ALLOCATOR(FormDataEvent);
14
15
WebIDL::ExceptionOr<JS::NonnullGCPtr<FormDataEvent>> FormDataEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, FormDataEventInit const& event_init)
16
0
{
17
0
    return realm.heap().allocate<FormDataEvent>(realm, realm, event_name, event_init);
18
0
}
19
20
FormDataEvent::FormDataEvent(JS::Realm& realm, FlyString const& event_name, FormDataEventInit const& event_init)
21
0
    : DOM::Event(realm, event_name, event_init)
22
0
    , m_form_data(event_init.form_data)
23
0
{
24
0
}
25
26
0
FormDataEvent::~FormDataEvent() = default;
27
28
void FormDataEvent::initialize(JS::Realm& realm)
29
0
{
30
0
    Base::initialize(realm);
31
0
    WEB_SET_PROTOTYPE_FOR_INTERFACE(FormDataEvent);
32
0
}
33
34
void FormDataEvent::visit_edges(Cell::Visitor& visitor)
35
0
{
36
0
    Base::visit_edges(visitor);
37
0
    visitor.visit(m_form_data);
38
0
}
39
40
}