(cb: BFSOneArgCallback)
| 159 | } |
| 160 | |
| 161 | public clear(cb: BFSOneArgCallback): void { |
| 162 | try { |
| 163 | const tx = this.db.transaction(this.storeName, 'readwrite'), |
| 164 | objectStore = tx.objectStore(this.storeName), |
| 165 | r: IDBRequest = objectStore.clear(); |
| 166 | r.onsuccess = (event) => { |
| 167 | // Use setTimeout to commit transaction. |
| 168 | setTimeout(cb, 0); |
| 169 | }; |
| 170 | r.onerror = onErrorHandler(cb); |
| 171 | } catch (e) { |
| 172 | cb(convertError(e)); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | public beginTransaction(type: 'readonly'): AsyncKeyValueROTransaction; |
| 177 | public beginTransaction(type: 'readwrite'): AsyncKeyValueRWTransaction; |
nothing calls this directly
no test coverage detected