mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 00:08:55 +00:00
LibWeb: Implement IDBDatabase::close()
This commit is contained in:
parent
49ad27816b
commit
bb31b682a5
Notes:
github-actions[bot]
2024-11-26 13:52:06 +00:00
Author: https://github.com/stelar7
Commit: bb31b682a5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2236
Reviewed-by: https://github.com/gmta ✅
4 changed files with 27 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <LibWeb/DOM/EventTarget.h>
|
||||
#include <LibWeb/HTML/DOMStringList.h>
|
||||
#include <LibWeb/IndexedDB/IDBRequest.h>
|
||||
#include <LibWeb/IndexedDB/Internal/Algorithms.h>
|
||||
#include <LibWeb/IndexedDB/Internal/Database.h>
|
||||
#include <LibWeb/StorageAPI/StorageKey.h>
|
||||
|
||||
|
@ -35,6 +36,7 @@ public:
|
|||
|
||||
void set_version(u64 version) { m_version = version; }
|
||||
void set_close_pending(bool close_pending) { m_close_pending = close_pending; }
|
||||
void set_state(ConnectionState state) { m_state = state; }
|
||||
|
||||
[[nodiscard]] GC::Ref<HTML::DOMStringList> object_store_names() { return m_object_store_names; }
|
||||
[[nodiscard]] String name() const { return m_name; }
|
||||
|
@ -43,6 +45,13 @@ public:
|
|||
[[nodiscard]] ConnectionState state() const { return m_state; }
|
||||
[[nodiscard]] GC::Ref<Database> associated_database() { return m_associated_database; }
|
||||
|
||||
// https://w3c.github.io/IndexedDB/#dom-idbdatabase-close
|
||||
void close()
|
||||
{
|
||||
// 1. Run close a database connection with this connection.
|
||||
close_a_database_connection(*this);
|
||||
}
|
||||
|
||||
void set_onabort(WebIDL::CallbackType*);
|
||||
WebIDL::CallbackType* onabort();
|
||||
void set_onclose(WebIDL::CallbackType*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue