1 Test IndexedDB's IDBObjectStore.delete(IDBKeyRange) method.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "delete-range.html"
7 indexedDB.deleteDatabase(dbname)
9 db.createObjectStore('store')
11 trans = db.transaction('store', 'readwrite')
12 store = trans.objectStore('store')
23 store.delete(IDBKeyRange.bound(3, 8, false, false))
24 getting keys from store...
29 trans = db.transaction('store', 'readwrite')
30 store = trans.objectStore('store')
41 store.delete(IDBKeyRange.bound(3, 8, true, false))
42 getting keys from store...
47 trans = db.transaction('store', 'readwrite')
48 store = trans.objectStore('store')
59 store.delete(IDBKeyRange.bound(3, 8, false, true))
60 getting keys from store...
65 trans = db.transaction('store', 'readwrite')
66 store = trans.objectStore('store')
77 store.delete(IDBKeyRange.bound(3, 8, true, true))
78 getting keys from store...
79 expect: [1,2,3,8,9,10]
80 actual: [1,2,3,8,9,10]
82 PASS successfullyParsed is true