LibWeb/IDB: Implement IDBObjectStore::autoIncrement

This commit is contained in:
stelar7 2025-03-24 20:56:36 +01:00 committed by Jelle Raaijmakers
commit 2e02b62126
Notes: github-actions[bot] 2025-03-27 15:49:18 +00:00
3 changed files with 6 additions and 4 deletions

View file

@ -26,6 +26,10 @@ public:
JS::Value key_path() const;
GC::Ref<IDBTransaction> transaction() const { return m_transaction; }
// https://w3c.github.io/IndexedDB/#dom-idbobjectstore-autoincrement
// The autoIncrement getter steps are to return true if thiss object store has a key generator, and false otherwise.
bool auto_increment() const { return m_store->key_generator().has_value(); }
protected:
explicit IDBObjectStore(JS::Realm&, GC::Ref<ObjectStore>, GC::Ref<IDBTransaction>);
virtual void initialize(JS::Realm&) override;