LibWeb: Allow constructing a IDBOpenDBRequest

This commit is contained in:
stelar7 2024-11-04 18:20:47 +01:00 committed by Andrew Kaster
parent 67fccf4eb2
commit 47d6499f6d
Notes: github-actions[bot] 2024-11-08 18:12:28 +00:00
2 changed files with 8 additions and 0 deletions

View file

@ -27,6 +27,11 @@ void IDBOpenDBRequest::initialize(JS::Realm& realm)
WEB_SET_PROTOTYPE_FOR_INTERFACE(IDBOpenDBRequest);
}
JS::NonnullGCPtr<IDBOpenDBRequest> IDBOpenDBRequest::create(JS::Realm& realm)
{
return realm.heap().allocate<IDBOpenDBRequest>(realm, realm);
}
// https://w3c.github.io/IndexedDB/#dom-idbopendbrequest-onblocked
void IDBOpenDBRequest::set_onblocked(WebIDL::CallbackType* event_handler)
{

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (c) 2024, stelar7 <dudedbz@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -19,6 +20,8 @@ class IDBOpenDBRequest : public IDBRequest {
public:
virtual ~IDBOpenDBRequest();
[[nodiscard]] static JS::NonnullGCPtr<IDBOpenDBRequest> create(JS::Realm&);
void set_onblocked(WebIDL::CallbackType*);
WebIDL::CallbackType* onblocked();
void set_onupgradeneeded(WebIDL::CallbackType*);