mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-13 04:21:54 +00:00
LibWeb/IDB: Implement delete_records_from_an_object_store
This commit is contained in:
parent
7fa3bd00b5
commit
afe7951af4
Notes:
github-actions[bot]
2025-04-23 18:37:14 +00:00
Author: https://github.com/stelar7
Commit: afe7951af4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4317
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/kennethmyhra ✅
4 changed files with 35 additions and 0 deletions
|
@ -1308,4 +1308,15 @@ void inject_a_key_into_a_value_using_a_key_path(JS::Realm& realm, JS::Value valu
|
|||
VERIFY(status);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/IndexedDB/#delete-records-from-an-object-store
|
||||
void delete_records_from_an_object_store(GC::Ref<ObjectStore> store, GC::Ref<IDBKeyRange> range)
|
||||
{
|
||||
// 1. Remove all records, if any, from store’s list of records with key in range.
|
||||
store->remove_records_in_range(range);
|
||||
|
||||
// FIXME: 2. For each index which references store, remove every record from index’s list of records whose value is in range, if any such records exist.
|
||||
|
||||
// 3. Return undefined.
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue