Coverage Report

Created: 2025-09-05 06:52

/src/serenity/Userland/Libraries/LibWeb/HTML/HTMLModElement.cpp
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2020, the SerenityOS developers.
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#include <AK/Assertions.h>
8
#include <LibWeb/Bindings/HTMLModElementPrototype.h>
9
#include <LibWeb/Bindings/Intrinsics.h>
10
#include <LibWeb/HTML/HTMLModElement.h>
11
12
namespace Web::HTML {
13
14
JS_DEFINE_ALLOCATOR(HTMLModElement);
15
16
HTMLModElement::HTMLModElement(DOM::Document& document, DOM::QualifiedName qualified_name)
17
0
    : HTMLElement(document, move(qualified_name))
18
0
{
19
0
}
20
21
0
HTMLModElement::~HTMLModElement() = default;
22
23
void HTMLModElement::initialize(JS::Realm& realm)
24
0
{
25
0
    Base::initialize(realm);
26
0
    WEB_SET_PROTOTYPE_FOR_INTERFACE(HTMLModElement);
27
0
}
28
29
Optional<ARIA::Role> HTMLModElement::default_role() const
30
0
{
31
    // https://www.w3.org/TR/html-aria/#el-del
32
0
    if (local_name() == TagNames::del)
33
0
        return ARIA::Role::deletion;
34
    // https://www.w3.org/TR/html-aria/#el-ins
35
0
    if (local_name() == TagNames::ins)
36
0
        return ARIA::Role::insertion;
37
0
    VERIFY_NOT_REACHED();
38
0
}
39
40
}