mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb/IDB: Implement IDBObjectStore::add
This commit is contained in:
Notes:
github-actions[bot]
2025-04-23 18:36:55 +00:00
Author: https://github.com/stelar7 Commit: https://github.com/LadybirdBrowser/ladybird/commit/ca1e94f9eac Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4317 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/kennethmyhra ✅
@@ -317,4 +317,11 @@ WebIDL::ExceptionOr<GC::Ref<IDBRequest>> IDBObjectStore::add_or_put(GC::Ref<IDBO
|
||||
return result;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/IndexedDB/#dom-idbobjectstore-add
|
||||
WebIDL::ExceptionOr<GC::Ref<IDBRequest>> IDBObjectStore::add(JS::Value value, Optional<JS::Value> const& key)
|
||||
{
|
||||
// The add(value, key) method steps are to return the result of running add or put with this, value, key and the no-overwrite flag true.
|
||||
return add_or_put(*this, value, key, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user