Coverage Report

Created: 2026-02-16 07:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/HTML/WindowEventHandlers.cpp
Line
Count
Source
1
/*
2
 * Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#include <LibWeb/DOM/EventTarget.h>
8
#include <LibWeb/HTML/EventNames.h>
9
#include <LibWeb/HTML/WindowEventHandlers.h>
10
11
namespace Web::HTML {
12
13
#undef __ENUMERATE
14
#define __ENUMERATE(attribute_name, event_name)                                 \
15
    void WindowEventHandlers::set_##attribute_name(WebIDL::CallbackType* value) \
16
0
    {                                                                           \
17
0
        if (auto event_target = window_event_handlers_to_event_target())        \
18
0
            event_target->set_event_handler_attribute(event_name, value);       \
19
0
    }                                                                           \
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onafterprint(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onbeforeprint(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onbeforeunload(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onhashchange(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onlanguagechange(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onmessage(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onmessageerror(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onoffline(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_ononline(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onpagehide(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onpageshow(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onpopstate(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onrejectionhandled(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onstorage(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onunhandledrejection(Web::WebIDL::CallbackType*)
Unexecuted instantiation: Web::HTML::WindowEventHandlers::set_onunload(Web::WebIDL::CallbackType*)
20
    WebIDL::CallbackType* WindowEventHandlers::attribute_name()                 \
21
0
    {                                                                           \
22
0
        if (auto event_target = window_event_handlers_to_event_target())        \
23
0
            return event_target->event_handler_attribute(event_name);           \
24
0
        return nullptr;                                                         \
25
0
    }
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onafterprint()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onbeforeprint()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onbeforeunload()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onhashchange()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onlanguagechange()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onmessage()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onmessageerror()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onoffline()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::ononline()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onpagehide()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onpageshow()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onpopstate()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onrejectionhandled()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onstorage()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onunhandledrejection()
Unexecuted instantiation: Web::HTML::WindowEventHandlers::onunload()
26
ENUMERATE_WINDOW_EVENT_HANDLERS(__ENUMERATE)
27
#undef __ENUMERATE
28
29
0
WindowEventHandlers::~WindowEventHandlers() = default;
30
31
}