Coverage Report

Created: 2025-11-16 07:46

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.cpp
Line
Count
Source
1
/*
2
 * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
3
 * Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
4
 *
5
 * SPDX-License-Identifier: BSD-2-Clause
6
 */
7
8
#include <LibWeb/Bindings/IDBOpenDBRequestPrototype.h>
9
#include <LibWeb/Bindings/Intrinsics.h>
10
#include <LibWeb/HTML/EventNames.h>
11
#include <LibWeb/IndexedDB/IDBOpenDBRequest.h>
12
13
namespace Web::IndexedDB {
14
15
JS_DEFINE_ALLOCATOR(IDBOpenDBRequest);
16
17
0
IDBOpenDBRequest::~IDBOpenDBRequest() = default;
18
19
IDBOpenDBRequest::IDBOpenDBRequest(JS::Realm& realm)
20
0
    : IDBRequest(realm)
21
0
{
22
0
}
23
24
void IDBOpenDBRequest::initialize(JS::Realm& realm)
25
0
{
26
0
    Base::initialize(realm);
27
0
    WEB_SET_PROTOTYPE_FOR_INTERFACE(IDBOpenDBRequest);
28
0
}
29
30
// https://w3c.github.io/IndexedDB/#dom-idbopendbrequest-onblocked
31
void IDBOpenDBRequest::set_onblocked(WebIDL::CallbackType* event_handler)
32
0
{
33
0
    set_event_handler_attribute(HTML::EventNames::blocked, event_handler);
34
0
}
35
36
// https://w3c.github.io/IndexedDB/#dom-idbopendbrequest-onblocked
37
WebIDL::CallbackType* IDBOpenDBRequest::onblocked()
38
0
{
39
0
    return event_handler_attribute(HTML::EventNames::blocked);
40
0
}
41
42
// https://w3c.github.io/IndexedDB/#dom-idbopendbrequest-onupgradeneeded
43
void IDBOpenDBRequest::set_onupgradeneeded(WebIDL::CallbackType* event_handler)
44
0
{
45
0
    set_event_handler_attribute(HTML::EventNames::upgradeneeded, event_handler);
46
0
}
47
48
// https://w3c.github.io/IndexedDB/#dom-idbopendbrequest-onupgradeneeded
49
WebIDL::CallbackType* IDBOpenDBRequest::onupgradeneeded()
50
0
{
51
0
    return event_handler_attribute(HTML::EventNames::upgradeneeded);
52
0
}
53
54
}