| OLD | NEW |
| 1 library dart.dom.indexed_db; | 1 library dart.dom.indexed_db; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 6 import 'dart:typed_data'; | 6 import 'dart:typed_data'; |
| 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; | 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; |
| 8 import 'dart:_foreign_helper' show JS; | 8 import 'dart:_foreign_helper' show JS; |
| 9 import 'dart:_interceptors' show Interceptor, JSExtendableArray; | 9 import 'dart:_interceptors' show Interceptor, JSExtendableArray; |
| 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 @JSName('transaction') | 298 @JSName('transaction') |
| 299 Transaction _transaction(stores, mode) native; | 299 Transaction _transaction(stores, mode) native; |
| 300 | 300 |
| 301 // To suppress missing implicit constructor warnings. | 301 // To suppress missing implicit constructor warnings. |
| 302 factory Database._() { throw new UnsupportedError("Not supported"); } | 302 factory Database._() { throw new UnsupportedError("Not supported"); } |
| 303 | 303 |
| 304 @DomName('IDBDatabase.abortEvent') | 304 @DomName('IDBDatabase.abortEvent') |
| 305 @DocsEditable() | 305 @DocsEditable() |
| 306 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); | 306 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); |
| 307 | 307 |
| 308 @DomName('IDBDatabase.closeEvent') |
| 309 @DocsEditable() |
| 310 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540 |
| 311 @Experimental() |
| 312 static const EventStreamProvider<Event> closeEvent = const EventStreamProvider
<Event>('close'); |
| 313 |
| 308 @DomName('IDBDatabase.errorEvent') | 314 @DomName('IDBDatabase.errorEvent') |
| 309 @DocsEditable() | 315 @DocsEditable() |
| 310 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 316 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 311 | 317 |
| 312 @DomName('IDBDatabase.versionchangeEvent') | 318 @DomName('IDBDatabase.versionchangeEvent') |
| 313 @DocsEditable() | 319 @DocsEditable() |
| 314 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons
t EventStreamProvider<VersionChangeEvent>('versionchange'); | 320 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons
t EventStreamProvider<VersionChangeEvent>('versionchange'); |
| 315 | 321 |
| 316 @DomName('IDBDatabase.name') | 322 @DomName('IDBDatabase.name') |
| 317 @DocsEditable() | 323 @DocsEditable() |
| 318 final String name; | 324 final String name; |
| 319 | 325 |
| 320 @DomName('IDBDatabase.objectStoreNames') | 326 @DomName('IDBDatabase.objectStoreNames') |
| 321 @DocsEditable() | 327 @DocsEditable() |
| 322 @Returns('DomStringList') | 328 @Returns('DomStringList') |
| 323 @Creates('DomStringList') | 329 @Creates('DomStringList') |
| 324 final List<String> objectStoreNames; | 330 final List<String> objectStoreNames; |
| 325 | 331 |
| 326 @DomName('IDBDatabase.version') | 332 @DomName('IDBDatabase.version') |
| 327 @DocsEditable() | 333 @DocsEditable() |
| 328 @Creates('int|String|Null') | 334 @Creates('int|String|Null') |
| 329 @Returns('int|String|Null') | 335 @Returns('int|String|Null') |
| 330 final dynamic version; | 336 final dynamic version; |
| 331 | 337 |
| 332 @JSName('addEventListener') | |
| 333 @DomName('IDBDatabase.addEventListener') | |
| 334 @DocsEditable() | |
| 335 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | |
| 336 | |
| 337 @DomName('IDBDatabase.close') | 338 @DomName('IDBDatabase.close') |
| 338 @DocsEditable() | 339 @DocsEditable() |
| 339 void close() native; | 340 void close() native; |
| 340 | 341 |
| 341 @DomName('IDBDatabase.createObjectStore') | 342 @DomName('IDBDatabase.createObjectStore') |
| 342 @DocsEditable() | 343 @DocsEditable() |
| 343 ObjectStore $dom_createObjectStore(String name, [Map options]) { | 344 ObjectStore $dom_createObjectStore(String name, [Map options]) { |
| 344 if (options != null) { | 345 if (options != null) { |
| 345 var options_1 = convertDartToNative_Dictionary(options); | 346 var options_1 = convertDartToNative_Dictionary(options); |
| 346 return _$dom_createObjectStore_1(name, options_1); | 347 return _$dom_createObjectStore_1(name, options_1); |
| 347 } | 348 } |
| 348 return _$dom_createObjectStore_2(name); | 349 return _$dom_createObjectStore_2(name); |
| 349 } | 350 } |
| 350 @JSName('createObjectStore') | 351 @JSName('createObjectStore') |
| 351 @DomName('IDBDatabase.createObjectStore') | 352 @DomName('IDBDatabase.createObjectStore') |
| 352 @DocsEditable() | 353 @DocsEditable() |
| 353 ObjectStore _$dom_createObjectStore_1(name, options) native; | 354 ObjectStore _$dom_createObjectStore_1(name, options) native; |
| 354 @JSName('createObjectStore') | 355 @JSName('createObjectStore') |
| 355 @DomName('IDBDatabase.createObjectStore') | 356 @DomName('IDBDatabase.createObjectStore') |
| 356 @DocsEditable() | 357 @DocsEditable() |
| 357 ObjectStore _$dom_createObjectStore_2(name) native; | 358 ObjectStore _$dom_createObjectStore_2(name) native; |
| 358 | 359 |
| 359 @DomName('IDBDatabase.deleteObjectStore') | 360 @DomName('IDBDatabase.deleteObjectStore') |
| 360 @DocsEditable() | 361 @DocsEditable() |
| 361 void deleteObjectStore(String name) native; | 362 void deleteObjectStore(String name) native; |
| 362 | 363 |
| 363 @DomName('IDBDatabase.dispatchEvent') | |
| 364 @DocsEditable() | |
| 365 bool dispatchEvent(Event evt) native; | |
| 366 | |
| 367 @JSName('removeEventListener') | |
| 368 @DomName('IDBDatabase.removeEventListener') | |
| 369 @DocsEditable() | |
| 370 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | |
| 371 | |
| 372 @DomName('IDBDatabase.onabort') | 364 @DomName('IDBDatabase.onabort') |
| 373 @DocsEditable() | 365 @DocsEditable() |
| 374 Stream<Event> get onAbort => abortEvent.forTarget(this); | 366 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 375 | 367 |
| 368 @DomName('IDBDatabase.onclose') |
| 369 @DocsEditable() |
| 370 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540 |
| 371 @Experimental() |
| 372 Stream<Event> get onClose => closeEvent.forTarget(this); |
| 373 |
| 376 @DomName('IDBDatabase.onerror') | 374 @DomName('IDBDatabase.onerror') |
| 377 @DocsEditable() | 375 @DocsEditable() |
| 378 Stream<Event> get onError => errorEvent.forTarget(this); | 376 Stream<Event> get onError => errorEvent.forTarget(this); |
| 379 | 377 |
| 380 @DomName('IDBDatabase.onversionchange') | 378 @DomName('IDBDatabase.onversionchange') |
| 381 @DocsEditable() | 379 @DocsEditable() |
| 382 Stream<VersionChangeEvent> get onVersionChange => versionChangeEvent.forTarget
(this); | 380 Stream<VersionChangeEvent> get onVersionChange => versionChangeEvent.forTarget
(this); |
| 383 } | 381 } |
| 384 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 382 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 385 // for details. All rights reserved. Use of this source code is governed by a | 383 // for details. All rights reserved. Use of this source code is governed by a |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 } | 1076 } |
| 1079 } | 1077 } |
| 1080 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1078 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1081 // for details. All rights reserved. Use of this source code is governed by a | 1079 // for details. All rights reserved. Use of this source code is governed by a |
| 1082 // BSD-style license that can be found in the LICENSE file. | 1080 // BSD-style license that can be found in the LICENSE file. |
| 1083 | 1081 |
| 1084 | 1082 |
| 1085 @DocsEditable() | 1083 @DocsEditable() |
| 1086 @DomName('IDBOpenDBRequest') | 1084 @DomName('IDBOpenDBRequest') |
| 1087 @Unstable() | 1085 @Unstable() |
| 1088 class OpenDBRequest extends Request implements EventTarget native "IDBOpenDBRequ
est,IDBVersionChangeRequest" { | 1086 class OpenDBRequest extends Request native "IDBOpenDBRequest,IDBVersionChangeReq
uest" { |
| 1089 // To suppress missing implicit constructor warnings. | 1087 // To suppress missing implicit constructor warnings. |
| 1090 factory OpenDBRequest._() { throw new UnsupportedError("Not supported"); } | 1088 factory OpenDBRequest._() { throw new UnsupportedError("Not supported"); } |
| 1091 | 1089 |
| 1092 @DomName('IDBOpenDBRequest.blockedEvent') | 1090 @DomName('IDBOpenDBRequest.blockedEvent') |
| 1093 @DocsEditable() | 1091 @DocsEditable() |
| 1094 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); | 1092 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); |
| 1095 | 1093 |
| 1096 @DomName('IDBOpenDBRequest.upgradeneededEvent') | 1094 @DomName('IDBOpenDBRequest.upgradeneededEvent') |
| 1097 @DocsEditable() | 1095 @DocsEditable() |
| 1098 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons
t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); | 1096 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons
t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 | 1140 |
| 1143 @DomName('IDBRequest.source') | 1141 @DomName('IDBRequest.source') |
| 1144 @DocsEditable() | 1142 @DocsEditable() |
| 1145 @Creates('Null') | 1143 @Creates('Null') |
| 1146 final dynamic source; | 1144 final dynamic source; |
| 1147 | 1145 |
| 1148 @DomName('IDBRequest.transaction') | 1146 @DomName('IDBRequest.transaction') |
| 1149 @DocsEditable() | 1147 @DocsEditable() |
| 1150 final Transaction transaction; | 1148 final Transaction transaction; |
| 1151 | 1149 |
| 1152 @JSName('addEventListener') | |
| 1153 @DomName('IDBRequest.addEventListener') | |
| 1154 @DocsEditable() | |
| 1155 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | |
| 1156 | |
| 1157 @DomName('IDBRequest.dispatchEvent') | |
| 1158 @DocsEditable() | |
| 1159 bool dispatchEvent(Event evt) native; | |
| 1160 | |
| 1161 @JSName('removeEventListener') | |
| 1162 @DomName('IDBRequest.removeEventListener') | |
| 1163 @DocsEditable() | |
| 1164 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | |
| 1165 | |
| 1166 @DomName('IDBRequest.onerror') | 1150 @DomName('IDBRequest.onerror') |
| 1167 @DocsEditable() | 1151 @DocsEditable() |
| 1168 Stream<Event> get onError => errorEvent.forTarget(this); | 1152 Stream<Event> get onError => errorEvent.forTarget(this); |
| 1169 | 1153 |
| 1170 @DomName('IDBRequest.onsuccess') | 1154 @DomName('IDBRequest.onsuccess') |
| 1171 @DocsEditable() | 1155 @DocsEditable() |
| 1172 Stream<Event> get onSuccess => successEvent.forTarget(this); | 1156 Stream<Event> get onSuccess => successEvent.forTarget(this); |
| 1173 } | 1157 } |
| 1174 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1158 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 1175 // for details. All rights reserved. Use of this source code is governed by a | 1159 // for details. All rights reserved. Use of this source code is governed by a |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 final DomError error; | 1213 final DomError error; |
| 1230 | 1214 |
| 1231 @DomName('IDBTransaction.mode') | 1215 @DomName('IDBTransaction.mode') |
| 1232 @DocsEditable() | 1216 @DocsEditable() |
| 1233 final String mode; | 1217 final String mode; |
| 1234 | 1218 |
| 1235 @DomName('IDBTransaction.abort') | 1219 @DomName('IDBTransaction.abort') |
| 1236 @DocsEditable() | 1220 @DocsEditable() |
| 1237 void abort() native; | 1221 void abort() native; |
| 1238 | 1222 |
| 1239 @JSName('addEventListener') | |
| 1240 @DomName('IDBTransaction.addEventListener') | |
| 1241 @DocsEditable() | |
| 1242 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | |
| 1243 | |
| 1244 @DomName('IDBTransaction.dispatchEvent') | |
| 1245 @DocsEditable() | |
| 1246 bool dispatchEvent(Event evt) native; | |
| 1247 | |
| 1248 @DomName('IDBTransaction.objectStore') | 1223 @DomName('IDBTransaction.objectStore') |
| 1249 @DocsEditable() | 1224 @DocsEditable() |
| 1250 ObjectStore objectStore(String name) native; | 1225 ObjectStore objectStore(String name) native; |
| 1251 | 1226 |
| 1252 @JSName('removeEventListener') | |
| 1253 @DomName('IDBTransaction.removeEventListener') | |
| 1254 @DocsEditable() | |
| 1255 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | |
| 1256 | |
| 1257 @DomName('IDBTransaction.onabort') | 1227 @DomName('IDBTransaction.onabort') |
| 1258 @DocsEditable() | 1228 @DocsEditable() |
| 1259 Stream<Event> get onAbort => abortEvent.forTarget(this); | 1229 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 1260 | 1230 |
| 1261 @DomName('IDBTransaction.oncomplete') | 1231 @DomName('IDBTransaction.oncomplete') |
| 1262 @DocsEditable() | 1232 @DocsEditable() |
| 1263 Stream<Event> get onComplete => completeEvent.forTarget(this); | 1233 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 1264 | 1234 |
| 1265 @DomName('IDBTransaction.onerror') | 1235 @DomName('IDBTransaction.onerror') |
| 1266 @DocsEditable() | 1236 @DocsEditable() |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1269 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1300 // for details. All rights reserved. Use of this source code is governed by a | 1270 // for details. All rights reserved. Use of this source code is governed by a |
| 1301 // BSD-style license that can be found in the LICENSE file. | 1271 // BSD-style license that can be found in the LICENSE file. |
| 1302 | 1272 |
| 1303 | 1273 |
| 1304 @DocsEditable() | 1274 @DocsEditable() |
| 1305 @DomName('IDBAny') | 1275 @DomName('IDBAny') |
| 1306 @deprecated // nonstandard | 1276 @deprecated // nonstandard |
| 1307 abstract class _IDBAny extends Interceptor native "IDBAny" { | 1277 abstract class _IDBAny extends Interceptor native "IDBAny" { |
| 1308 } | 1278 } |
| OLD | NEW |