LibWeb/IDB: Implement IDBObjectStore::put

This commit is contained in:
stelar7 2025-04-11 11:42:19 +02:00 committed by Andrew Kaster
parent ca1e94f9ea
commit 5d48652890
Notes: github-actions[bot] 2025-04-23 18:36:49 +00:00
3 changed files with 9 additions and 1 deletions

View file

@ -324,4 +324,11 @@ WebIDL::ExceptionOr<GC::Ref<IDBRequest>> IDBObjectStore::add(JS::Value value, Op
return add_or_put(*this, value, key, true);
}
// https://w3c.github.io/IndexedDB/#dom-idbobjectstore-put
WebIDL::ExceptionOr<GC::Ref<IDBRequest>> IDBObjectStore::put(JS::Value value, Optional<JS::Value> const& key)
{
// The put(value, key) method steps are to return the result of running add or put with this, value, key and the no-overwrite flag false.
return add_or_put(*this, value, key, false);
}
}