LibWeb: Add stub interface for IDBOpenDBRequest

This commit is contained in:
Shannon Booth 2024-05-19 18:07:06 +12:00 committed by Andreas Kling
parent bfa330914d
commit 3aa36caa52
6 changed files with 67 additions and 0 deletions

View file

@ -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

View file

@ -500,6 +500,7 @@ class Performance;
namespace Web::IndexedDB {
class IDBFactory;
class IDBOpenDBRequest;
class IDBRequest;
}

View 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);
}
}

View 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;
};
}

View 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;
};

View file

@ -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)