mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
LibWeb: Add stub interface for IDBOpenDBRequest
This commit is contained in:
parent
bfa330914d
commit
3aa36caa52
Notes:
sideshowbarker
2024-07-16 21:42:29 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/3aa36caa52 Pull-request: https://github.com/SerenityOS/serenity/pull/24377 Reviewed-by: https://github.com/tcl3
|
@ -448,6 +448,7 @@ set(SOURCES
|
|||
Infra/JSON.cpp
|
||||
Infra/Strings.cpp
|
||||
IndexedDB/IDBFactory.cpp
|
||||
IndexedDB/IDBOpenDBRequest.cpp
|
||||
IndexedDB/IDBRequest.cpp
|
||||
Internals/Inspector.cpp
|
||||
Internals/InternalAnimationTimeline.cpp
|
||||
|
|
|
@ -500,6 +500,7 @@ class Performance;
|
|||
|
||||
namespace Web::IndexedDB {
|
||||
class IDBFactory;
|
||||
class IDBOpenDBRequest;
|
||||
class IDBRequest;
|
||||
}
|
||||
|
||||
|
|
28
Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.cpp
Normal file
28
Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/IDBOpenDBRequestPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/IndexedDB/IDBOpenDBRequest.h>
|
||||
|
||||
namespace Web::IndexedDB {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(IDBOpenDBRequest);
|
||||
|
||||
IDBOpenDBRequest::~IDBOpenDBRequest() = default;
|
||||
|
||||
IDBOpenDBRequest::IDBOpenDBRequest(JS::Realm& realm)
|
||||
: IDBRequest(realm)
|
||||
{
|
||||
}
|
||||
|
||||
void IDBOpenDBRequest::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(IDBOpenDBRequest);
|
||||
}
|
||||
|
||||
}
|
27
Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.h
Normal file
27
Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/IndexedDB/IDBRequest.h>
|
||||
|
||||
namespace Web::IndexedDB {
|
||||
|
||||
// https://w3c.github.io/IndexedDB/#idbopendbrequest
|
||||
class IDBOpenDBRequest : public IDBRequest {
|
||||
WEB_PLATFORM_OBJECT(IDBOpenDBRequest, IDBRequest);
|
||||
JS_DECLARE_ALLOCATOR(IDBOpenDBRequest);
|
||||
|
||||
public:
|
||||
virtual ~IDBOpenDBRequest();
|
||||
|
||||
protected:
|
||||
explicit IDBOpenDBRequest(JS::Realm&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
9
Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.idl
Normal file
9
Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.idl
Normal file
|
@ -0,0 +1,9 @@
|
|||
#import <IndexedDB/IDBRequest.idl>
|
||||
|
||||
// https://w3c.github.io/IndexedDB/#idbopendbrequest
|
||||
[Exposed=(Window,Worker)]
|
||||
interface IDBOpenDBRequest : IDBRequest {
|
||||
// Event handlers:
|
||||
// FIXME: attribute EventHandler onblocked;
|
||||
// FIXME: attribute EventHandler onupgradeneeded;
|
||||
};
|
|
@ -217,6 +217,7 @@ libweb_js_bindings(HTML/WorkerLocation)
|
|||
libweb_js_bindings(HTML/WorkerNavigator)
|
||||
libweb_js_bindings(HighResolutionTime/Performance)
|
||||
libweb_js_bindings(IndexedDB/IDBFactory)
|
||||
libweb_js_bindings(IndexedDB/IDBOpenDBRequest)
|
||||
libweb_js_bindings(IndexedDB/IDBRequest)
|
||||
libweb_js_bindings(Internals/Inspector)
|
||||
libweb_js_bindings(Internals/InternalAnimationTimeline)
|
||||
|
|
Loading…
Reference in a new issue