| OLD | NEW |
| 1 /** | 1 /** |
| 2 * A client-side key-value store with support for indexes. | 2 * A client-side key-value store with support for indexes. |
| 3 * | 3 * |
| 4 * Many browsers support IndexedDB—a web standard for | 4 * Many browsers support IndexedDB—a web standard for |
| 5 * an indexed database. | 5 * an indexed database. |
| 6 * By storing data on the client in an IndexedDB, | 6 * By storing data on the client in an IndexedDB, |
| 7 * a web app gets some advantages, such as faster performance and persistence. | 7 * a web app gets some advantages, such as faster performance and persistence. |
| 8 * To find out which browsers support IndexedDB, | 8 * To find out which browsers support IndexedDB, |
| 9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) | 9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) |
| 10 * | 10 * |
| (...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 | 1254 |
| 1255 this.onComplete.first.then((_) { | 1255 this.onComplete.first.then((_) { |
| 1256 completer.complete(db); | 1256 completer.complete(db); |
| 1257 }); | 1257 }); |
| 1258 | 1258 |
| 1259 this.onError.first.then((e) { | 1259 this.onError.first.then((e) { |
| 1260 completer.completeError(e); | 1260 completer.completeError(e); |
| 1261 }); | 1261 }); |
| 1262 | 1262 |
| 1263 this.onAbort.first.then((e) { | 1263 this.onAbort.first.then((e) { |
| 1264 completer.completeError(e); | 1264 // Avoid completing twice if an error occurs. |
| 1265 if (!completer.isCompleted) { |
| 1266 completer.completeError(e); |
| 1267 } |
| 1265 }); | 1268 }); |
| 1266 | 1269 |
| 1267 return completer.future; | 1270 return completer.future; |
| 1268 } | 1271 } |
| 1269 | 1272 |
| 1270 // To suppress missing implicit constructor warnings. | 1273 // To suppress missing implicit constructor warnings. |
| 1271 factory Transaction._() { throw new UnsupportedError("Not supported"); } | 1274 factory Transaction._() { throw new UnsupportedError("Not supported"); } |
| 1272 | 1275 |
| 1273 @DomName('IDBTransaction.abortEvent') | 1276 @DomName('IDBTransaction.abortEvent') |
| 1274 @DocsEditable() | 1277 @DocsEditable() |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 // BSD-style license that can be found in the LICENSE file. | 1352 // BSD-style license that can be found in the LICENSE file. |
| 1350 | 1353 |
| 1351 | 1354 |
| 1352 @DocsEditable() | 1355 @DocsEditable() |
| 1353 @DomName('IDBAny') | 1356 @DomName('IDBAny') |
| 1354 @deprecated // nonstandard | 1357 @deprecated // nonstandard |
| 1355 abstract class _IDBAny extends Interceptor native "IDBAny" { | 1358 abstract class _IDBAny extends Interceptor native "IDBAny" { |
| 1356 // To suppress missing implicit constructor warnings. | 1359 // To suppress missing implicit constructor warnings. |
| 1357 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } | 1360 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } |
| 1358 } | 1361 } |
| OLD | NEW |