mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibWeb/IDB: Implement IDBObjectStore::name
This commit is contained in:
parent
2e02b62126
commit
3879391fa6
Notes:
github-actions[bot]
2025-03-27 15:49:10 +00:00
Author: https://github.com/stelar7
Commit: 3879391fa6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4077
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
6 changed files with 80 additions and 13 deletions
|
@ -29,6 +29,8 @@ public:
|
|||
// https://w3c.github.io/IndexedDB/#dom-idbobjectstore-autoincrement
|
||||
// The autoIncrement getter steps are to return true if this’s object store has a key generator, and false otherwise.
|
||||
bool auto_increment() const { return m_store->key_generator().has_value(); }
|
||||
String name() const { return m_name; }
|
||||
WebIDL::ExceptionOr<void> set_name(String const& value);
|
||||
|
||||
protected:
|
||||
explicit IDBObjectStore(JS::Realm&, GC::Ref<ObjectStore>, GC::Ref<IDBTransaction>);
|
||||
|
@ -39,6 +41,9 @@ private:
|
|||
// An object store handle has an associated object store and an associated transaction.
|
||||
GC::Ref<ObjectStore> m_store;
|
||||
GC::Ref<IDBTransaction> m_transaction;
|
||||
|
||||
// An object store handle has a name, which is initialized to the name of the associated object store when the object store handle is created.
|
||||
String m_name;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue