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/HTMLOrSVGElement.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <LibJS/Heap/Cell.h>
10
#include <LibJS/Heap/GCPtr.h>
11
#include <LibWeb/HTML/DOMStringMap.h>
12
13
namespace Web::HTML {
14
15
template<typename ElementBase>
16
class HTMLOrSVGElement {
17
public:
18
    [[nodiscard]] JS::NonnullGCPtr<DOMStringMap> dataset();
19
20
    // https://html.spec.whatwg.org/#dom-noncedelement-nonce
21
0
    String const& nonce() { return m_cryptographic_nonce; }
Unexecuted instantiation: Web::HTML::HTMLOrSVGElement<Web::HTML::HTMLElement>::nonce()
Unexecuted instantiation: Web::HTML::HTMLOrSVGElement<Web::MathML::MathMLElement>::nonce()
Unexecuted instantiation: Web::HTML::HTMLOrSVGElement<Web::SVG::SVGElement>::nonce()
22
0
    void set_nonce(String const& nonce) { m_cryptographic_nonce = nonce; }
Unexecuted instantiation: Web::HTML::HTMLOrSVGElement<Web::HTML::HTMLElement>::set_nonce(AK::String const&)
Unexecuted instantiation: Web::HTML::HTMLOrSVGElement<Web::MathML::MathMLElement>::set_nonce(AK::String const&)
Unexecuted instantiation: Web::HTML::HTMLOrSVGElement<Web::SVG::SVGElement>::set_nonce(AK::String const&)
23
24
    void focus();
25
    void blur();
26
27
protected:
28
    void attribute_change_steps(FlyString const&, Optional<String> const&, Optional<String> const&, Optional<FlyString> const&);
29
    WebIDL::ExceptionOr<void> cloned(DOM::Node&, bool);
30
    void inserted();
31
    void visit_edges(JS::Cell::Visitor&);
32
33
    // https://html.spec.whatwg.org/multipage/dom.html#dom-dataset-dev
34
    JS::GCPtr<DOMStringMap> m_dataset;
35
36
    // https://html.spec.whatwg.org/#cryptographicnonce
37
    String m_cryptographic_nonce;
38
39
    // https://html.spec.whatwg.org/multipage/interaction.html#locked-for-focus
40
    bool m_locked_for_focus { false };
41
};
42
43
}