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