| OLD | NEW |
| 1 library indexed_db; | 1 library 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 7 // for details. All rights reserved. Use of this source code is governed by a | 7 // for details. All rights reserved. Use of this source code is governed by a |
| 8 // BSD-style license that can be found in the LICENSE file. | 8 // BSD-style license that can be found in the LICENSE file. |
| 9 | 9 |
| 10 // DO NOT EDIT | 10 // DO NOT EDIT |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 | 127 |
| 128 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date. | 128 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date. |
| 129 const _annotation_Creates_IDBKey = const Creates(_idbKey); | 129 const _annotation_Creates_IDBKey = const Creates(_idbKey); |
| 130 const _annotation_Returns_IDBKey = const Returns(_idbKey); | 130 const _annotation_Returns_IDBKey = const Returns(_idbKey); |
| 131 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 131 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 132 // for details. All rights reserved. Use of this source code is governed by a | 132 // for details. All rights reserved. Use of this source code is governed by a |
| 133 // BSD-style license that can be found in the LICENSE file. | 133 // BSD-style license that can be found in the LICENSE file. |
| 134 | 134 |
| 135 | 135 |
| 136 /// @docsEditable true | 136 |
| 137 @DocsEditable |
| 137 @DomName('IDBCursor') | 138 @DomName('IDBCursor') |
| 138 class Cursor native "*IDBCursor" { | 139 class Cursor native "*IDBCursor" { |
| 139 | 140 |
| 140 /// @docsEditable true | 141 @DocsEditable @DomName('IDBCursor.direction') |
| 141 @DomName('IDBCursor.direction') | |
| 142 final String direction; | 142 final String direction; |
| 143 | 143 |
| 144 /// @docsEditable true | 144 @DocsEditable @DomName('IDBCursor.key') @_annotation_Creates_IDBKey @_annotati
on_Returns_IDBKey |
| 145 @DomName('IDBCursor.key') @_annotation_Creates_IDBKey @_annotation_Returns_IDB
Key | |
| 146 final Object key; | 145 final Object key; |
| 147 | 146 |
| 148 /// @docsEditable true | 147 @DocsEditable @DomName('IDBCursor.primaryKey') |
| 149 @DomName('IDBCursor.primaryKey') | |
| 150 final Object primaryKey; | 148 final Object primaryKey; |
| 151 | 149 |
| 152 /// @docsEditable true | 150 @DocsEditable @DomName('IDBCursor.source') |
| 153 @DomName('IDBCursor.source') | |
| 154 final dynamic source; | 151 final dynamic source; |
| 155 | 152 |
| 156 /// @docsEditable true | 153 @DocsEditable @DomName('IDBCursor.advance') |
| 157 @DomName('IDBCursor.advance') | |
| 158 void advance(int count) native; | 154 void advance(int count) native; |
| 159 | 155 |
| 160 /// @docsEditable true | |
| 161 void continueFunction([/*IDBKey*/ key]) { | 156 void continueFunction([/*IDBKey*/ key]) { |
| 162 if (?key) { | 157 if (?key) { |
| 163 var key_1 = _convertDartToNative_IDBKey(key); | 158 var key_1 = _convertDartToNative_IDBKey(key); |
| 164 _continueFunction_1(key_1); | 159 _continueFunction_1(key_1); |
| 165 return; | 160 return; |
| 166 } | 161 } |
| 167 _continueFunction_2(); | 162 _continueFunction_2(); |
| 168 return; | 163 return; |
| 169 } | 164 } |
| 170 @JSName('continue') | 165 @JSName('continue') |
| 171 @DomName('IDBCursor.continue') | 166 @DocsEditable @DomName('IDBCursor.continue') |
| 172 void _continueFunction_1(key) native; | 167 void _continueFunction_1(key) native; |
| 173 @JSName('continue') | 168 @JSName('continue') |
| 174 @DomName('IDBCursor.continue') | 169 @DocsEditable @DomName('IDBCursor.continue') |
| 175 void _continueFunction_2() native; | 170 void _continueFunction_2() native; |
| 176 | 171 |
| 177 /// @docsEditable true | 172 @DocsEditable @DomName('IDBCursor.delete') |
| 178 @DomName('IDBCursor.delete') | |
| 179 Request delete() native; | 173 Request delete() native; |
| 180 | 174 |
| 181 /// @docsEditable true | |
| 182 Request update(/*any*/ value) { | 175 Request update(/*any*/ value) { |
| 183 var value_1 = convertDartToNative_SerializedScriptValue(value); | 176 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 184 return _update_1(value_1); | 177 return _update_1(value_1); |
| 185 } | 178 } |
| 186 @JSName('update') | 179 @JSName('update') |
| 187 @DomName('IDBCursor.update') | 180 @DocsEditable @DomName('IDBCursor.update') |
| 188 Request _update_1(value) native; | 181 Request _update_1(value) native; |
| 189 } | 182 } |
| 190 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 183 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 191 // for details. All rights reserved. Use of this source code is governed by a | 184 // for details. All rights reserved. Use of this source code is governed by a |
| 192 // BSD-style license that can be found in the LICENSE file. | 185 // BSD-style license that can be found in the LICENSE file. |
| 193 | 186 |
| 194 | 187 |
| 195 /// @docsEditable true | 188 |
| 189 @DocsEditable |
| 196 @DomName('IDBCursorWithValue') | 190 @DomName('IDBCursorWithValue') |
| 197 class CursorWithValue extends Cursor native "*IDBCursorWithValue" { | 191 class CursorWithValue extends Cursor native "*IDBCursorWithValue" { |
| 198 | 192 |
| 199 /// @docsEditable true | 193 @DocsEditable @DomName('IDBCursorWithValue.value') @annotation_Creates_Seriali
zedScriptValue @annotation_Returns_SerializedScriptValue |
| 200 @DomName('IDBCursorWithValue.value') @annotation_Creates_SerializedScriptValue
@annotation_Returns_SerializedScriptValue | |
| 201 final Object value; | 194 final Object value; |
| 202 } | 195 } |
| 203 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 196 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 204 // for details. All rights reserved. Use of this source code is governed by a | 197 // for details. All rights reserved. Use of this source code is governed by a |
| 205 // BSD-style license that can be found in the LICENSE file. | 198 // BSD-style license that can be found in the LICENSE file. |
| 206 | 199 |
| 207 | 200 |
| 201 @DocsEditable |
| 208 @DomName('IDBDatabase') | 202 @DomName('IDBDatabase') |
| 209 @SupportedBrowser(SupportedBrowser.CHROME) | 203 @SupportedBrowser(SupportedBrowser.CHROME) |
| 210 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') | 204 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') |
| 211 @SupportedBrowser(SupportedBrowser.IE, '10') | 205 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 212 @Experimental() | 206 @Experimental() |
| 213 class Database extends EventTarget native "*IDBDatabase" { | 207 class Database extends EventTarget native "*IDBDatabase" { |
| 214 | 208 |
| 215 Transaction transaction(storeName_OR_storeNames, String mode) { | 209 Transaction transaction(storeName_OR_storeNames, String mode) { |
| 216 if (mode != 'readonly' && mode != 'readwrite') { | 210 if (mode != 'readonly' && mode != 'readwrite') { |
| 217 throw new ArgumentError(mode); | 211 throw new ArgumentError(mode); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 229 @JSName('transaction') | 223 @JSName('transaction') |
| 230 Transaction _transaction(stores, mode) native; | 224 Transaction _transaction(stores, mode) native; |
| 231 | 225 |
| 232 | 226 |
| 233 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); | 227 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); |
| 234 | 228 |
| 235 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 229 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 236 | 230 |
| 237 static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = cons
t EventStreamProvider<UpgradeNeededEvent>('versionchange'); | 231 static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = cons
t EventStreamProvider<UpgradeNeededEvent>('versionchange'); |
| 238 | 232 |
| 239 /// @docsEditable true | 233 @DocsEditable |
| 240 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 234 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 241 DatabaseEvents get on => | 235 DatabaseEvents get on => |
| 242 new DatabaseEvents(this); | 236 new DatabaseEvents(this); |
| 243 | 237 |
| 244 /// @docsEditable true | 238 @DocsEditable @DomName('IDBDatabase.name') |
| 245 @DomName('IDBDatabase.name') | |
| 246 final String name; | 239 final String name; |
| 247 | 240 |
| 248 /// @docsEditable true | 241 @DocsEditable @DomName('IDBDatabase.objectStoreNames') |
| 249 @DomName('IDBDatabase.objectStoreNames') | |
| 250 @Returns('DomStringList') @Creates('DomStringList') | 242 @Returns('DomStringList') @Creates('DomStringList') |
| 251 final List<String> objectStoreNames; | 243 final List<String> objectStoreNames; |
| 252 | 244 |
| 253 /// @docsEditable true | 245 @DocsEditable @DomName('IDBDatabase.version') |
| 254 @DomName('IDBDatabase.version') | |
| 255 final dynamic version; | 246 final dynamic version; |
| 256 | 247 |
| 257 /// @docsEditable true | |
| 258 @JSName('addEventListener') | 248 @JSName('addEventListener') |
| 259 @DomName('IDBDatabase.addEventListener') | 249 @DocsEditable @DomName('IDBDatabase.addEventListener') |
| 260 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 250 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 261 | 251 |
| 262 /// @docsEditable true | 252 @DocsEditable @DomName('IDBDatabase.close') |
| 263 @DomName('IDBDatabase.close') | |
| 264 void close() native; | 253 void close() native; |
| 265 | 254 |
| 266 /// @docsEditable true | |
| 267 ObjectStore createObjectStore(String name, [Map options]) { | 255 ObjectStore createObjectStore(String name, [Map options]) { |
| 268 if (?options) { | 256 if (?options) { |
| 269 var options_1 = convertDartToNative_Dictionary(options); | 257 var options_1 = convertDartToNative_Dictionary(options); |
| 270 return _createObjectStore_1(name, options_1); | 258 return _createObjectStore_1(name, options_1); |
| 271 } | 259 } |
| 272 return _createObjectStore_2(name); | 260 return _createObjectStore_2(name); |
| 273 } | 261 } |
| 274 @JSName('createObjectStore') | 262 @JSName('createObjectStore') |
| 275 @DomName('IDBDatabase.createObjectStore') | 263 @DocsEditable @DomName('IDBDatabase.createObjectStore') |
| 276 ObjectStore _createObjectStore_1(name, options) native; | 264 ObjectStore _createObjectStore_1(name, options) native; |
| 277 @JSName('createObjectStore') | 265 @JSName('createObjectStore') |
| 278 @DomName('IDBDatabase.createObjectStore') | 266 @DocsEditable @DomName('IDBDatabase.createObjectStore') |
| 279 ObjectStore _createObjectStore_2(name) native; | 267 ObjectStore _createObjectStore_2(name) native; |
| 280 | 268 |
| 281 /// @docsEditable true | 269 @DocsEditable @DomName('IDBDatabase.deleteObjectStore') |
| 282 @DomName('IDBDatabase.deleteObjectStore') | |
| 283 void deleteObjectStore(String name) native; | 270 void deleteObjectStore(String name) native; |
| 284 | 271 |
| 285 /// @docsEditable true | |
| 286 @JSName('dispatchEvent') | 272 @JSName('dispatchEvent') |
| 287 @DomName('IDBDatabase.dispatchEvent') | 273 @DocsEditable @DomName('IDBDatabase.dispatchEvent') |
| 288 bool $dom_dispatchEvent(Event evt) native; | 274 bool $dom_dispatchEvent(Event evt) native; |
| 289 | 275 |
| 290 /// @docsEditable true | |
| 291 @JSName('removeEventListener') | 276 @JSName('removeEventListener') |
| 292 @DomName('IDBDatabase.removeEventListener') | 277 @DocsEditable @DomName('IDBDatabase.removeEventListener') |
| 293 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 278 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 294 | 279 |
| 295 Stream<Event> get onAbort => abortEvent.forTarget(this); | 280 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 296 | 281 |
| 297 Stream<Event> get onError => errorEvent.forTarget(this); | 282 Stream<Event> get onError => errorEvent.forTarget(this); |
| 298 | 283 |
| 299 Stream<UpgradeNeededEvent> get onVersionChange => versionChangeEvent.forTarget
(this); | 284 Stream<UpgradeNeededEvent> get onVersionChange => versionChangeEvent.forTarget
(this); |
| 300 } | 285 } |
| 301 | 286 |
| 302 /// @docsEditable true | 287 @DocsEditable |
| 303 class DatabaseEvents extends Events { | 288 class DatabaseEvents extends Events { |
| 304 /// @docsEditable true | 289 @DocsEditable |
| 305 DatabaseEvents(EventTarget _ptr) : super(_ptr); | 290 DatabaseEvents(EventTarget _ptr) : super(_ptr); |
| 306 | 291 |
| 307 /// @docsEditable true | 292 @DocsEditable |
| 308 EventListenerList get abort => this['abort']; | 293 EventListenerList get abort => this['abort']; |
| 309 | 294 |
| 310 /// @docsEditable true | 295 @DocsEditable |
| 311 EventListenerList get error => this['error']; | 296 EventListenerList get error => this['error']; |
| 312 | 297 |
| 313 /// @docsEditable true | 298 @DocsEditable |
| 314 EventListenerList get versionChange => this['versionchange']; | 299 EventListenerList get versionChange => this['versionchange']; |
| 315 } | 300 } |
| 316 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 301 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 317 // for details. All rights reserved. Use of this source code is governed by a | 302 // for details. All rights reserved. Use of this source code is governed by a |
| 318 // BSD-style license that can be found in the LICENSE file. | 303 // BSD-style license that can be found in the LICENSE file. |
| 319 | 304 |
| 320 | 305 |
| 306 @DocsEditable |
| 321 @DomName('IDBFactory') | 307 @DomName('IDBFactory') |
| 322 @SupportedBrowser(SupportedBrowser.CHROME) | 308 @SupportedBrowser(SupportedBrowser.CHROME) |
| 323 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') | 309 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') |
| 324 @SupportedBrowser(SupportedBrowser.IE, '10') | 310 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 325 @Experimental() | 311 @Experimental() |
| 326 class IdbFactory native "*IDBFactory" { | 312 class IdbFactory native "*IDBFactory" { |
| 327 /** | 313 /** |
| 328 * Checks to see if Indexed DB is supported on the current platform. | 314 * Checks to see if Indexed DB is supported on the current platform. |
| 329 */ | 315 */ |
| 330 static bool get supported { | 316 static bool get supported { |
| 331 return JS('bool', | 317 return JS('bool', |
| 332 '!!(window.indexedDB || ' | 318 '!!(window.indexedDB || ' |
| 333 'window.webkitIndexedDB || ' | 319 'window.webkitIndexedDB || ' |
| 334 'window.mozIndexedDB)'); | 320 'window.mozIndexedDB)'); |
| 335 } | 321 } |
| 336 | 322 |
| 337 | 323 |
| 338 /// @docsEditable true | |
| 339 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) { | 324 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) { |
| 340 var first_1 = _convertDartToNative_IDBKey(first); | 325 var first_1 = _convertDartToNative_IDBKey(first); |
| 341 var second_2 = _convertDartToNative_IDBKey(second); | 326 var second_2 = _convertDartToNative_IDBKey(second); |
| 342 return _cmp_1(first_1, second_2); | 327 return _cmp_1(first_1, second_2); |
| 343 } | 328 } |
| 344 @JSName('cmp') | 329 @JSName('cmp') |
| 345 @DomName('IDBFactory.cmp') | 330 @DocsEditable @DomName('IDBFactory.cmp') |
| 346 int _cmp_1(first, second) native; | 331 int _cmp_1(first, second) native; |
| 347 | 332 |
| 348 /// @docsEditable true | 333 @DocsEditable @DomName('IDBFactory.deleteDatabase') |
| 349 @DomName('IDBFactory.deleteDatabase') | |
| 350 VersionChangeRequest deleteDatabase(String name) native; | 334 VersionChangeRequest deleteDatabase(String name) native; |
| 351 | 335 |
| 352 /// @docsEditable true | 336 @DocsEditable @DomName('IDBFactory.open') @Returns('Request') @Creates('Reques
t') @Creates('Database') |
| 353 @DomName('IDBFactory.open') @Returns('Request') @Creates('Request') @Creates('
Database') | |
| 354 OpenDBRequest open(String name, [int version]) native; | 337 OpenDBRequest open(String name, [int version]) native; |
| 355 | 338 |
| 356 /// @docsEditable true | 339 @DocsEditable @DomName('IDBFactory.webkitGetDatabaseNames') |
| 357 @DomName('IDBFactory.webkitGetDatabaseNames') | |
| 358 Request webkitGetDatabaseNames() native; | 340 Request webkitGetDatabaseNames() native; |
| 359 | 341 |
| 360 } | 342 } |
| 361 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 343 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 362 // for details. All rights reserved. Use of this source code is governed by a | 344 // for details. All rights reserved. Use of this source code is governed by a |
| 363 // BSD-style license that can be found in the LICENSE file. | 345 // BSD-style license that can be found in the LICENSE file. |
| 364 | 346 |
| 365 | 347 |
| 366 /// @docsEditable true | 348 |
| 349 @DocsEditable |
| 367 @DomName('IDBIndex') | 350 @DomName('IDBIndex') |
| 368 class Index native "*IDBIndex" { | 351 class Index native "*IDBIndex" { |
| 369 | 352 |
| 370 /// @docsEditable true | 353 @DocsEditable @DomName('IDBIndex.keyPath') |
| 371 @DomName('IDBIndex.keyPath') | |
| 372 final dynamic keyPath; | 354 final dynamic keyPath; |
| 373 | 355 |
| 374 /// @docsEditable true | 356 @DocsEditable @DomName('IDBIndex.multiEntry') |
| 375 @DomName('IDBIndex.multiEntry') | |
| 376 final bool multiEntry; | 357 final bool multiEntry; |
| 377 | 358 |
| 378 /// @docsEditable true | 359 @DocsEditable @DomName('IDBIndex.name') |
| 379 @DomName('IDBIndex.name') | |
| 380 final String name; | 360 final String name; |
| 381 | 361 |
| 382 /// @docsEditable true | 362 @DocsEditable @DomName('IDBIndex.objectStore') |
| 383 @DomName('IDBIndex.objectStore') | |
| 384 final ObjectStore objectStore; | 363 final ObjectStore objectStore; |
| 385 | 364 |
| 386 /// @docsEditable true | 365 @DocsEditable @DomName('IDBIndex.unique') |
| 387 @DomName('IDBIndex.unique') | |
| 388 final bool unique; | 366 final bool unique; |
| 389 | 367 |
| 390 /// @docsEditable true | |
| 391 Request count([key_OR_range]) { | 368 Request count([key_OR_range]) { |
| 392 if (!?key_OR_range) { | 369 if (!?key_OR_range) { |
| 393 return _count_1(); | 370 return _count_1(); |
| 394 } | 371 } |
| 395 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 372 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 396 return _count_2(key_OR_range); | 373 return _count_2(key_OR_range); |
| 397 } | 374 } |
| 398 if (?key_OR_range) { | 375 if (?key_OR_range) { |
| 399 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 376 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 400 return _count_3(key_1); | 377 return _count_3(key_1); |
| 401 } | 378 } |
| 402 throw new ArgumentError("Incorrect number or type of arguments"); | 379 throw new ArgumentError("Incorrect number or type of arguments"); |
| 403 } | 380 } |
| 404 @JSName('count') | 381 @JSName('count') |
| 405 @DomName('IDBIndex.count') | 382 @DocsEditable @DomName('IDBIndex.count') |
| 406 Request _count_1() native; | 383 Request _count_1() native; |
| 407 @JSName('count') | 384 @JSName('count') |
| 408 @DomName('IDBIndex.count') | 385 @DocsEditable @DomName('IDBIndex.count') |
| 409 Request _count_2(KeyRange range) native; | 386 Request _count_2(KeyRange range) native; |
| 410 @JSName('count') | 387 @JSName('count') |
| 411 @DomName('IDBIndex.count') | 388 @DocsEditable @DomName('IDBIndex.count') |
| 412 Request _count_3(key) native; | 389 Request _count_3(key) native; |
| 413 | 390 |
| 414 /// @docsEditable true | |
| 415 Request get(key) { | 391 Request get(key) { |
| 416 if ((key is KeyRange || key == null)) { | 392 if ((key is KeyRange || key == null)) { |
| 417 return _get_1(key); | 393 return _get_1(key); |
| 418 } | 394 } |
| 419 if (?key) { | 395 if (?key) { |
| 420 var key_1 = _convertDartToNative_IDBKey(key); | 396 var key_1 = _convertDartToNative_IDBKey(key); |
| 421 return _get_2(key_1); | 397 return _get_2(key_1); |
| 422 } | 398 } |
| 423 throw new ArgumentError("Incorrect number or type of arguments"); | 399 throw new ArgumentError("Incorrect number or type of arguments"); |
| 424 } | 400 } |
| 425 @JSName('get') | 401 @JSName('get') |
| 426 @DomName('IDBIndex.get') @Returns('Request') @Creates('Request') @annotation_C
reates_SerializedScriptValue | 402 @DocsEditable @DomName('IDBIndex.get') @Returns('Request') @Creates('Request')
@annotation_Creates_SerializedScriptValue |
| 427 Request _get_1(KeyRange key) native; | 403 Request _get_1(KeyRange key) native; |
| 428 @JSName('get') | 404 @JSName('get') |
| 429 @DomName('IDBIndex.get') @Returns('Request') @Creates('Request') @annotation_C
reates_SerializedScriptValue | 405 @DocsEditable @DomName('IDBIndex.get') @Returns('Request') @Creates('Request')
@annotation_Creates_SerializedScriptValue |
| 430 Request _get_2(key) native; | 406 Request _get_2(key) native; |
| 431 | 407 |
| 432 /// @docsEditable true | |
| 433 Request getKey(key) { | 408 Request getKey(key) { |
| 434 if ((key is KeyRange || key == null)) { | 409 if ((key is KeyRange || key == null)) { |
| 435 return _getKey_1(key); | 410 return _getKey_1(key); |
| 436 } | 411 } |
| 437 if (?key) { | 412 if (?key) { |
| 438 var key_1 = _convertDartToNative_IDBKey(key); | 413 var key_1 = _convertDartToNative_IDBKey(key); |
| 439 return _getKey_2(key_1); | 414 return _getKey_2(key_1); |
| 440 } | 415 } |
| 441 throw new ArgumentError("Incorrect number or type of arguments"); | 416 throw new ArgumentError("Incorrect number or type of arguments"); |
| 442 } | 417 } |
| 443 @JSName('getKey') | 418 @JSName('getKey') |
| 444 @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Request') @annotatio
n_Creates_SerializedScriptValue @Creates('ObjectStore') | 419 @DocsEditable @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Reques
t') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore') |
| 445 Request _getKey_1(KeyRange key) native; | 420 Request _getKey_1(KeyRange key) native; |
| 446 @JSName('getKey') | 421 @JSName('getKey') |
| 447 @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Request') @annotatio
n_Creates_SerializedScriptValue @Creates('ObjectStore') | 422 @DocsEditable @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Reques
t') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore') |
| 448 Request _getKey_2(key) native; | 423 Request _getKey_2(key) native; |
| 449 | 424 |
| 450 /// @docsEditable true | |
| 451 Request openCursor([key_OR_range, String direction]) { | 425 Request openCursor([key_OR_range, String direction]) { |
| 452 if (!?key_OR_range && | 426 if (!?key_OR_range && |
| 453 !?direction) { | 427 !?direction) { |
| 454 return _openCursor_1(); | 428 return _openCursor_1(); |
| 455 } | 429 } |
| 456 if ((key_OR_range is KeyRange || key_OR_range == null) && | 430 if ((key_OR_range is KeyRange || key_OR_range == null) && |
| 457 !?direction) { | 431 !?direction) { |
| 458 return _openCursor_2(key_OR_range); | 432 return _openCursor_2(key_OR_range); |
| 459 } | 433 } |
| 460 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 434 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 461 return _openCursor_3(key_OR_range, direction); | 435 return _openCursor_3(key_OR_range, direction); |
| 462 } | 436 } |
| 463 if (?key_OR_range && | 437 if (?key_OR_range && |
| 464 !?direction) { | 438 !?direction) { |
| 465 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 439 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 466 return _openCursor_4(key_1); | 440 return _openCursor_4(key_1); |
| 467 } | 441 } |
| 468 if (?key_OR_range) { | 442 if (?key_OR_range) { |
| 469 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 443 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 470 return _openCursor_5(key_2, direction); | 444 return _openCursor_5(key_2, direction); |
| 471 } | 445 } |
| 472 throw new ArgumentError("Incorrect number or type of arguments"); | 446 throw new ArgumentError("Incorrect number or type of arguments"); |
| 473 } | 447 } |
| 474 @JSName('openCursor') | 448 @JSName('openCursor') |
| 475 @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creat
es('Cursor') | 449 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') |
| 476 Request _openCursor_1() native; | 450 Request _openCursor_1() native; |
| 477 @JSName('openCursor') | 451 @JSName('openCursor') |
| 478 @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creat
es('Cursor') | 452 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') |
| 479 Request _openCursor_2(KeyRange range) native; | 453 Request _openCursor_2(KeyRange range) native; |
| 480 @JSName('openCursor') | 454 @JSName('openCursor') |
| 481 @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creat
es('Cursor') | 455 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') |
| 482 Request _openCursor_3(KeyRange range, direction) native; | 456 Request _openCursor_3(KeyRange range, direction) native; |
| 483 @JSName('openCursor') | 457 @JSName('openCursor') |
| 484 @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creat
es('Cursor') | 458 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') |
| 485 Request _openCursor_4(key) native; | 459 Request _openCursor_4(key) native; |
| 486 @JSName('openCursor') | 460 @JSName('openCursor') |
| 487 @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creat
es('Cursor') | 461 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') |
| 488 Request _openCursor_5(key, direction) native; | 462 Request _openCursor_5(key, direction) native; |
| 489 | 463 |
| 490 /// @docsEditable true | |
| 491 Request openKeyCursor([key_OR_range, String direction]) { | 464 Request openKeyCursor([key_OR_range, String direction]) { |
| 492 if (!?key_OR_range && | 465 if (!?key_OR_range && |
| 493 !?direction) { | 466 !?direction) { |
| 494 return _openKeyCursor_1(); | 467 return _openKeyCursor_1(); |
| 495 } | 468 } |
| 496 if ((key_OR_range is KeyRange || key_OR_range == null) && | 469 if ((key_OR_range is KeyRange || key_OR_range == null) && |
| 497 !?direction) { | 470 !?direction) { |
| 498 return _openKeyCursor_2(key_OR_range); | 471 return _openKeyCursor_2(key_OR_range); |
| 499 } | 472 } |
| 500 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 473 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 501 return _openKeyCursor_3(key_OR_range, direction); | 474 return _openKeyCursor_3(key_OR_range, direction); |
| 502 } | 475 } |
| 503 if (?key_OR_range && | 476 if (?key_OR_range && |
| 504 !?direction) { | 477 !?direction) { |
| 505 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 478 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 506 return _openKeyCursor_4(key_1); | 479 return _openKeyCursor_4(key_1); |
| 507 } | 480 } |
| 508 if (?key_OR_range) { | 481 if (?key_OR_range) { |
| 509 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 482 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 510 return _openKeyCursor_5(key_2, direction); | 483 return _openKeyCursor_5(key_2, direction); |
| 511 } | 484 } |
| 512 throw new ArgumentError("Incorrect number or type of arguments"); | 485 throw new ArgumentError("Incorrect number or type of arguments"); |
| 513 } | 486 } |
| 514 @JSName('openKeyCursor') | 487 @JSName('openKeyCursor') |
| 515 @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Cr
eates('Cursor') | 488 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') |
| 516 Request _openKeyCursor_1() native; | 489 Request _openKeyCursor_1() native; |
| 517 @JSName('openKeyCursor') | 490 @JSName('openKeyCursor') |
| 518 @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Cr
eates('Cursor') | 491 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') |
| 519 Request _openKeyCursor_2(KeyRange range) native; | 492 Request _openKeyCursor_2(KeyRange range) native; |
| 520 @JSName('openKeyCursor') | 493 @JSName('openKeyCursor') |
| 521 @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Cr
eates('Cursor') | 494 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') |
| 522 Request _openKeyCursor_3(KeyRange range, direction) native; | 495 Request _openKeyCursor_3(KeyRange range, direction) native; |
| 523 @JSName('openKeyCursor') | 496 @JSName('openKeyCursor') |
| 524 @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Cr
eates('Cursor') | 497 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') |
| 525 Request _openKeyCursor_4(key) native; | 498 Request _openKeyCursor_4(key) native; |
| 526 @JSName('openKeyCursor') | 499 @JSName('openKeyCursor') |
| 527 @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Cr
eates('Cursor') | 500 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') |
| 528 Request _openKeyCursor_5(key, direction) native; | 501 Request _openKeyCursor_5(key, direction) native; |
| 529 } | 502 } |
| 530 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 503 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 531 // for details. All rights reserved. Use of this source code is governed by a | 504 // for details. All rights reserved. Use of this source code is governed by a |
| 532 // BSD-style license that can be found in the LICENSE file. | 505 // BSD-style license that can be found in the LICENSE file. |
| 533 | 506 |
| 534 | 507 |
| 535 /// @docsEditable true | 508 |
| 509 @DocsEditable |
| 536 @DomName('IDBKey') | 510 @DomName('IDBKey') |
| 537 class Key native "*IDBKey" { | 511 class Key native "*IDBKey" { |
| 538 } | 512 } |
| 539 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 513 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 540 // for details. All rights reserved. Use of this source code is governed by a | 514 // for details. All rights reserved. Use of this source code is governed by a |
| 541 // BSD-style license that can be found in the LICENSE file. | 515 // BSD-style license that can be found in the LICENSE file. |
| 542 | 516 |
| 543 | 517 |
| 518 @DocsEditable |
| 544 @DomName('IDBKeyRange') | 519 @DomName('IDBKeyRange') |
| 545 class KeyRange native "*IDBKeyRange" { | 520 class KeyRange native "*IDBKeyRange" { |
| 546 @DomName('IDBKeyRange.only') | 521 @DomName('IDBKeyRange.only') |
| 547 factory KeyRange.only(/*Key*/ value) => | 522 factory KeyRange.only(/*Key*/ value) => |
| 548 _KeyRangeFactoryProvider.createKeyRange_only(value); | 523 _KeyRangeFactoryProvider.createKeyRange_only(value); |
| 549 | 524 |
| 550 @DomName('IDBKeyRange.lowerBound') | 525 @DomName('IDBKeyRange.lowerBound') |
| 551 factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) => | 526 factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) => |
| 552 _KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open); | 527 _KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open); |
| 553 | 528 |
| 554 @DomName('IDBKeyRange.upperBound') | 529 @DomName('IDBKeyRange.upperBound') |
| 555 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) => | 530 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) => |
| 556 _KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open); | 531 _KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open); |
| 557 | 532 |
| 558 @DomName('KeyRange.bound') | 533 @DomName('KeyRange.bound') |
| 559 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, | 534 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, |
| 560 [bool lowerOpen = false, bool upperOpen = false]) => | 535 [bool lowerOpen = false, bool upperOpen = false]) => |
| 561 _KeyRangeFactoryProvider.createKeyRange_bound( | 536 _KeyRangeFactoryProvider.createKeyRange_bound( |
| 562 lower, upper, lowerOpen, upperOpen); | 537 lower, upper, lowerOpen, upperOpen); |
| 563 | 538 |
| 564 | 539 |
| 565 /// @docsEditable true | |
| 566 dynamic get lower => _convertNativeToDart_IDBKey(this._lower); | 540 dynamic get lower => _convertNativeToDart_IDBKey(this._lower); |
| 567 @JSName('lower') | 541 @JSName('lower') |
| 568 @DomName('IDBKeyRange.lower') | 542 @DocsEditable @DomName('IDBKeyRange.lower') |
| 569 final dynamic _lower; | 543 final dynamic _lower; |
| 570 | 544 |
| 571 /// @docsEditable true | 545 @DocsEditable @DomName('IDBKeyRange.lowerOpen') |
| 572 @DomName('IDBKeyRange.lowerOpen') | |
| 573 final bool lowerOpen; | 546 final bool lowerOpen; |
| 574 | 547 |
| 575 /// @docsEditable true | |
| 576 dynamic get upper => _convertNativeToDart_IDBKey(this._upper); | 548 dynamic get upper => _convertNativeToDart_IDBKey(this._upper); |
| 577 @JSName('upper') | 549 @JSName('upper') |
| 578 @DomName('IDBKeyRange.upper') | 550 @DocsEditable @DomName('IDBKeyRange.upper') |
| 579 final dynamic _upper; | 551 final dynamic _upper; |
| 580 | 552 |
| 581 /// @docsEditable true | 553 @DocsEditable @DomName('IDBKeyRange.upperOpen') |
| 582 @DomName('IDBKeyRange.upperOpen') | |
| 583 final bool upperOpen; | 554 final bool upperOpen; |
| 584 | 555 |
| 585 /// @docsEditable true | |
| 586 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bo
ol upperOpen]) { | 556 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bo
ol upperOpen]) { |
| 587 if (?upperOpen) { | 557 if (?upperOpen) { |
| 588 var lower_1 = _convertDartToNative_IDBKey(lower); | 558 var lower_1 = _convertDartToNative_IDBKey(lower); |
| 589 var upper_2 = _convertDartToNative_IDBKey(upper); | 559 var upper_2 = _convertDartToNative_IDBKey(upper); |
| 590 return _bound__1(lower_1, upper_2, lowerOpen, upperOpen); | 560 return _bound__1(lower_1, upper_2, lowerOpen, upperOpen); |
| 591 } | 561 } |
| 592 if (?lowerOpen) { | 562 if (?lowerOpen) { |
| 593 var lower_3 = _convertDartToNative_IDBKey(lower); | 563 var lower_3 = _convertDartToNative_IDBKey(lower); |
| 594 var upper_4 = _convertDartToNative_IDBKey(upper); | 564 var upper_4 = _convertDartToNative_IDBKey(upper); |
| 595 return _bound__2(lower_3, upper_4, lowerOpen); | 565 return _bound__2(lower_3, upper_4, lowerOpen); |
| 596 } | 566 } |
| 597 var lower_5 = _convertDartToNative_IDBKey(lower); | 567 var lower_5 = _convertDartToNative_IDBKey(lower); |
| 598 var upper_6 = _convertDartToNative_IDBKey(upper); | 568 var upper_6 = _convertDartToNative_IDBKey(upper); |
| 599 return _bound__3(lower_5, upper_6); | 569 return _bound__3(lower_5, upper_6); |
| 600 } | 570 } |
| 601 @JSName('bound') | 571 @JSName('bound') |
| 602 @DomName('IDBKeyRange.bound') | 572 @DocsEditable @DomName('IDBKeyRange.bound') |
| 603 static KeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native; | 573 static KeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native; |
| 604 @JSName('bound') | 574 @JSName('bound') |
| 605 @DomName('IDBKeyRange.bound') | 575 @DocsEditable @DomName('IDBKeyRange.bound') |
| 606 static KeyRange _bound__2(lower, upper, lowerOpen) native; | 576 static KeyRange _bound__2(lower, upper, lowerOpen) native; |
| 607 @JSName('bound') | 577 @JSName('bound') |
| 608 @DomName('IDBKeyRange.bound') | 578 @DocsEditable @DomName('IDBKeyRange.bound') |
| 609 static KeyRange _bound__3(lower, upper) native; | 579 static KeyRange _bound__3(lower, upper) native; |
| 610 | 580 |
| 611 /// @docsEditable true | |
| 612 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { | 581 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { |
| 613 if (?open) { | 582 if (?open) { |
| 614 var bound_1 = _convertDartToNative_IDBKey(bound); | 583 var bound_1 = _convertDartToNative_IDBKey(bound); |
| 615 return _lowerBound__1(bound_1, open); | 584 return _lowerBound__1(bound_1, open); |
| 616 } | 585 } |
| 617 var bound_2 = _convertDartToNative_IDBKey(bound); | 586 var bound_2 = _convertDartToNative_IDBKey(bound); |
| 618 return _lowerBound__2(bound_2); | 587 return _lowerBound__2(bound_2); |
| 619 } | 588 } |
| 620 @JSName('lowerBound') | 589 @JSName('lowerBound') |
| 621 @DomName('IDBKeyRange.lowerBound') | 590 @DocsEditable @DomName('IDBKeyRange.lowerBound') |
| 622 static KeyRange _lowerBound__1(bound, open) native; | 591 static KeyRange _lowerBound__1(bound, open) native; |
| 623 @JSName('lowerBound') | 592 @JSName('lowerBound') |
| 624 @DomName('IDBKeyRange.lowerBound') | 593 @DocsEditable @DomName('IDBKeyRange.lowerBound') |
| 625 static KeyRange _lowerBound__2(bound) native; | 594 static KeyRange _lowerBound__2(bound) native; |
| 626 | 595 |
| 627 /// @docsEditable true | |
| 628 static KeyRange only_(/*IDBKey*/ value) { | 596 static KeyRange only_(/*IDBKey*/ value) { |
| 629 var value_1 = _convertDartToNative_IDBKey(value); | 597 var value_1 = _convertDartToNative_IDBKey(value); |
| 630 return _only__1(value_1); | 598 return _only__1(value_1); |
| 631 } | 599 } |
| 632 @JSName('only') | 600 @JSName('only') |
| 633 @DomName('IDBKeyRange.only') | 601 @DocsEditable @DomName('IDBKeyRange.only') |
| 634 static KeyRange _only__1(value) native; | 602 static KeyRange _only__1(value) native; |
| 635 | 603 |
| 636 /// @docsEditable true | |
| 637 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { | 604 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { |
| 638 if (?open) { | 605 if (?open) { |
| 639 var bound_1 = _convertDartToNative_IDBKey(bound); | 606 var bound_1 = _convertDartToNative_IDBKey(bound); |
| 640 return _upperBound__1(bound_1, open); | 607 return _upperBound__1(bound_1, open); |
| 641 } | 608 } |
| 642 var bound_2 = _convertDartToNative_IDBKey(bound); | 609 var bound_2 = _convertDartToNative_IDBKey(bound); |
| 643 return _upperBound__2(bound_2); | 610 return _upperBound__2(bound_2); |
| 644 } | 611 } |
| 645 @JSName('upperBound') | 612 @JSName('upperBound') |
| 646 @DomName('IDBKeyRange.upperBound') | 613 @DocsEditable @DomName('IDBKeyRange.upperBound') |
| 647 static KeyRange _upperBound__1(bound, open) native; | 614 static KeyRange _upperBound__1(bound, open) native; |
| 648 @JSName('upperBound') | 615 @JSName('upperBound') |
| 649 @DomName('IDBKeyRange.upperBound') | 616 @DocsEditable @DomName('IDBKeyRange.upperBound') |
| 650 static KeyRange _upperBound__2(bound) native; | 617 static KeyRange _upperBound__2(bound) native; |
| 651 | 618 |
| 652 } | 619 } |
| 653 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 620 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 654 // for details. All rights reserved. Use of this source code is governed by a | 621 // for details. All rights reserved. Use of this source code is governed by a |
| 655 // BSD-style license that can be found in the LICENSE file. | 622 // BSD-style license that can be found in the LICENSE file. |
| 656 | 623 |
| 657 | 624 |
| 658 /// @docsEditable true | 625 |
| 626 @DocsEditable |
| 659 @DomName('IDBObjectStore') | 627 @DomName('IDBObjectStore') |
| 660 class ObjectStore native "*IDBObjectStore" { | 628 class ObjectStore native "*IDBObjectStore" { |
| 661 | 629 |
| 662 /// @docsEditable true | 630 @DocsEditable @DomName('IDBObjectStore.autoIncrement') |
| 663 @DomName('IDBObjectStore.autoIncrement') | |
| 664 final bool autoIncrement; | 631 final bool autoIncrement; |
| 665 | 632 |
| 666 /// @docsEditable true | 633 @DocsEditable @DomName('IDBObjectStore.indexNames') |
| 667 @DomName('IDBObjectStore.indexNames') | |
| 668 @Returns('DomStringList') @Creates('DomStringList') | 634 @Returns('DomStringList') @Creates('DomStringList') |
| 669 final List<String> indexNames; | 635 final List<String> indexNames; |
| 670 | 636 |
| 671 /// @docsEditable true | 637 @DocsEditable @DomName('IDBObjectStore.keyPath') |
| 672 @DomName('IDBObjectStore.keyPath') | |
| 673 final dynamic keyPath; | 638 final dynamic keyPath; |
| 674 | 639 |
| 675 /// @docsEditable true | 640 @DocsEditable @DomName('IDBObjectStore.name') |
| 676 @DomName('IDBObjectStore.name') | |
| 677 final String name; | 641 final String name; |
| 678 | 642 |
| 679 /// @docsEditable true | 643 @DocsEditable @DomName('IDBObjectStore.transaction') |
| 680 @DomName('IDBObjectStore.transaction') | |
| 681 final Transaction transaction; | 644 final Transaction transaction; |
| 682 | 645 |
| 683 /// @docsEditable true | |
| 684 Request add(/*any*/ value, [/*IDBKey*/ key]) { | 646 Request add(/*any*/ value, [/*IDBKey*/ key]) { |
| 685 if (?key) { | 647 if (?key) { |
| 686 var value_1 = convertDartToNative_SerializedScriptValue(value); | 648 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 687 var key_2 = _convertDartToNative_IDBKey(key); | 649 var key_2 = _convertDartToNative_IDBKey(key); |
| 688 return _add_1(value_1, key_2); | 650 return _add_1(value_1, key_2); |
| 689 } | 651 } |
| 690 var value_3 = convertDartToNative_SerializedScriptValue(value); | 652 var value_3 = convertDartToNative_SerializedScriptValue(value); |
| 691 return _add_2(value_3); | 653 return _add_2(value_3); |
| 692 } | 654 } |
| 693 @JSName('add') | 655 @JSName('add') |
| 694 @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Request') @_annot
ation_Creates_IDBKey | 656 @DocsEditable @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey |
| 695 Request _add_1(value, key) native; | 657 Request _add_1(value, key) native; |
| 696 @JSName('add') | 658 @JSName('add') |
| 697 @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Request') @_annot
ation_Creates_IDBKey | 659 @DocsEditable @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey |
| 698 Request _add_2(value) native; | 660 Request _add_2(value) native; |
| 699 | 661 |
| 700 /// @docsEditable true | 662 @DocsEditable @DomName('IDBObjectStore.clear') |
| 701 @DomName('IDBObjectStore.clear') | |
| 702 Request clear() native; | 663 Request clear() native; |
| 703 | 664 |
| 704 /// @docsEditable true | |
| 705 Request count([key_OR_range]) { | 665 Request count([key_OR_range]) { |
| 706 if (!?key_OR_range) { | 666 if (!?key_OR_range) { |
| 707 return _count_1(); | 667 return _count_1(); |
| 708 } | 668 } |
| 709 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 669 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 710 return _count_2(key_OR_range); | 670 return _count_2(key_OR_range); |
| 711 } | 671 } |
| 712 if (?key_OR_range) { | 672 if (?key_OR_range) { |
| 713 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 673 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 714 return _count_3(key_1); | 674 return _count_3(key_1); |
| 715 } | 675 } |
| 716 throw new ArgumentError("Incorrect number or type of arguments"); | 676 throw new ArgumentError("Incorrect number or type of arguments"); |
| 717 } | 677 } |
| 718 @JSName('count') | 678 @JSName('count') |
| 719 @DomName('IDBObjectStore.count') | 679 @DocsEditable @DomName('IDBObjectStore.count') |
| 720 Request _count_1() native; | 680 Request _count_1() native; |
| 721 @JSName('count') | 681 @JSName('count') |
| 722 @DomName('IDBObjectStore.count') | 682 @DocsEditable @DomName('IDBObjectStore.count') |
| 723 Request _count_2(KeyRange range) native; | 683 Request _count_2(KeyRange range) native; |
| 724 @JSName('count') | 684 @JSName('count') |
| 725 @DomName('IDBObjectStore.count') | 685 @DocsEditable @DomName('IDBObjectStore.count') |
| 726 Request _count_3(key) native; | 686 Request _count_3(key) native; |
| 727 | 687 |
| 728 /// @docsEditable true | |
| 729 Index createIndex(String name, keyPath, [Map options]) { | 688 Index createIndex(String name, keyPath, [Map options]) { |
| 730 if ((keyPath is List<String> || keyPath == null) && | 689 if ((keyPath is List<String> || keyPath == null) && |
| 731 !?options) { | 690 !?options) { |
| 732 return _createIndex_1(name, keyPath); | 691 return _createIndex_1(name, keyPath); |
| 733 } | 692 } |
| 734 if ((keyPath is List<String> || keyPath == null)) { | 693 if ((keyPath is List<String> || keyPath == null)) { |
| 735 var options_1 = convertDartToNative_Dictionary(options); | 694 var options_1 = convertDartToNative_Dictionary(options); |
| 736 return _createIndex_2(name, keyPath, options_1); | 695 return _createIndex_2(name, keyPath, options_1); |
| 737 } | 696 } |
| 738 if ((keyPath is String || keyPath == null) && | 697 if ((keyPath is String || keyPath == null) && |
| 739 !?options) { | 698 !?options) { |
| 740 return _createIndex_3(name, keyPath); | 699 return _createIndex_3(name, keyPath); |
| 741 } | 700 } |
| 742 if ((keyPath is String || keyPath == null)) { | 701 if ((keyPath is String || keyPath == null)) { |
| 743 var options_2 = convertDartToNative_Dictionary(options); | 702 var options_2 = convertDartToNative_Dictionary(options); |
| 744 return _createIndex_4(name, keyPath, options_2); | 703 return _createIndex_4(name, keyPath, options_2); |
| 745 } | 704 } |
| 746 throw new ArgumentError("Incorrect number or type of arguments"); | 705 throw new ArgumentError("Incorrect number or type of arguments"); |
| 747 } | 706 } |
| 748 @JSName('createIndex') | 707 @JSName('createIndex') |
| 749 @DomName('IDBObjectStore.createIndex') | 708 @DocsEditable @DomName('IDBObjectStore.createIndex') |
| 750 Index _createIndex_1(name, List<String> keyPath) native; | 709 Index _createIndex_1(name, List<String> keyPath) native; |
| 751 @JSName('createIndex') | 710 @JSName('createIndex') |
| 752 @DomName('IDBObjectStore.createIndex') | 711 @DocsEditable @DomName('IDBObjectStore.createIndex') |
| 753 Index _createIndex_2(name, List<String> keyPath, options) native; | 712 Index _createIndex_2(name, List<String> keyPath, options) native; |
| 754 @JSName('createIndex') | 713 @JSName('createIndex') |
| 755 @DomName('IDBObjectStore.createIndex') | 714 @DocsEditable @DomName('IDBObjectStore.createIndex') |
| 756 Index _createIndex_3(name, String keyPath) native; | 715 Index _createIndex_3(name, String keyPath) native; |
| 757 @JSName('createIndex') | 716 @JSName('createIndex') |
| 758 @DomName('IDBObjectStore.createIndex') | 717 @DocsEditable @DomName('IDBObjectStore.createIndex') |
| 759 Index _createIndex_4(name, String keyPath, options) native; | 718 Index _createIndex_4(name, String keyPath, options) native; |
| 760 | 719 |
| 761 /// @docsEditable true | |
| 762 Request delete(key_OR_keyRange) { | 720 Request delete(key_OR_keyRange) { |
| 763 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { | 721 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { |
| 764 return _delete_1(key_OR_keyRange); | 722 return _delete_1(key_OR_keyRange); |
| 765 } | 723 } |
| 766 if (?key_OR_keyRange) { | 724 if (?key_OR_keyRange) { |
| 767 var key_1 = _convertDartToNative_IDBKey(key_OR_keyRange); | 725 var key_1 = _convertDartToNative_IDBKey(key_OR_keyRange); |
| 768 return _delete_2(key_1); | 726 return _delete_2(key_1); |
| 769 } | 727 } |
| 770 throw new ArgumentError("Incorrect number or type of arguments"); | 728 throw new ArgumentError("Incorrect number or type of arguments"); |
| 771 } | 729 } |
| 772 @JSName('delete') | 730 @JSName('delete') |
| 773 @DomName('IDBObjectStore.delete') | 731 @DocsEditable @DomName('IDBObjectStore.delete') |
| 774 Request _delete_1(KeyRange keyRange) native; | 732 Request _delete_1(KeyRange keyRange) native; |
| 775 @JSName('delete') | 733 @JSName('delete') |
| 776 @DomName('IDBObjectStore.delete') | 734 @DocsEditable @DomName('IDBObjectStore.delete') |
| 777 Request _delete_2(key) native; | 735 Request _delete_2(key) native; |
| 778 | 736 |
| 779 /// @docsEditable true | 737 @DocsEditable @DomName('IDBObjectStore.deleteIndex') |
| 780 @DomName('IDBObjectStore.deleteIndex') | |
| 781 void deleteIndex(String name) native; | 738 void deleteIndex(String name) native; |
| 782 | 739 |
| 783 /// @docsEditable true | |
| 784 Request getObject(key) { | 740 Request getObject(key) { |
| 785 if ((key is KeyRange || key == null)) { | 741 if ((key is KeyRange || key == null)) { |
| 786 return _getObject_1(key); | 742 return _getObject_1(key); |
| 787 } | 743 } |
| 788 if (?key) { | 744 if (?key) { |
| 789 var key_1 = _convertDartToNative_IDBKey(key); | 745 var key_1 = _convertDartToNative_IDBKey(key); |
| 790 return _getObject_2(key_1); | 746 return _getObject_2(key_1); |
| 791 } | 747 } |
| 792 throw new ArgumentError("Incorrect number or type of arguments"); | 748 throw new ArgumentError("Incorrect number or type of arguments"); |
| 793 } | 749 } |
| 794 @JSName('get') | 750 @JSName('get') |
| 795 @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Request') @annota
tion_Creates_SerializedScriptValue | 751 @DocsEditable @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Req
uest') @annotation_Creates_SerializedScriptValue |
| 796 Request _getObject_1(KeyRange key) native; | 752 Request _getObject_1(KeyRange key) native; |
| 797 @JSName('get') | 753 @JSName('get') |
| 798 @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Request') @annota
tion_Creates_SerializedScriptValue | 754 @DocsEditable @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Req
uest') @annotation_Creates_SerializedScriptValue |
| 799 Request _getObject_2(key) native; | 755 Request _getObject_2(key) native; |
| 800 | 756 |
| 801 /// @docsEditable true | 757 @DocsEditable @DomName('IDBObjectStore.index') |
| 802 @DomName('IDBObjectStore.index') | |
| 803 Index index(String name) native; | 758 Index index(String name) native; |
| 804 | 759 |
| 805 /// @docsEditable true | |
| 806 Request openCursor([key_OR_range, String direction]) { | 760 Request openCursor([key_OR_range, String direction]) { |
| 807 if (!?key_OR_range && | 761 if (!?key_OR_range && |
| 808 !?direction) { | 762 !?direction) { |
| 809 return _openCursor_1(); | 763 return _openCursor_1(); |
| 810 } | 764 } |
| 811 if ((key_OR_range is KeyRange || key_OR_range == null) && | 765 if ((key_OR_range is KeyRange || key_OR_range == null) && |
| 812 !?direction) { | 766 !?direction) { |
| 813 return _openCursor_2(key_OR_range); | 767 return _openCursor_2(key_OR_range); |
| 814 } | 768 } |
| 815 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 769 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 816 return _openCursor_3(key_OR_range, direction); | 770 return _openCursor_3(key_OR_range, direction); |
| 817 } | 771 } |
| 818 if (?key_OR_range && | 772 if (?key_OR_range && |
| 819 !?direction) { | 773 !?direction) { |
| 820 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 774 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 821 return _openCursor_4(key_1); | 775 return _openCursor_4(key_1); |
| 822 } | 776 } |
| 823 if (?key_OR_range) { | 777 if (?key_OR_range) { |
| 824 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 778 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 825 return _openCursor_5(key_2, direction); | 779 return _openCursor_5(key_2, direction); |
| 826 } | 780 } |
| 827 throw new ArgumentError("Incorrect number or type of arguments"); | 781 throw new ArgumentError("Incorrect number or type of arguments"); |
| 828 } | 782 } |
| 829 @JSName('openCursor') | 783 @JSName('openCursor') |
| 830 @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request')
@Creates('Cursor') | 784 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') |
| 831 Request _openCursor_1() native; | 785 Request _openCursor_1() native; |
| 832 @JSName('openCursor') | 786 @JSName('openCursor') |
| 833 @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request')
@Creates('Cursor') | 787 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') |
| 834 Request _openCursor_2(KeyRange range) native; | 788 Request _openCursor_2(KeyRange range) native; |
| 835 @JSName('openCursor') | 789 @JSName('openCursor') |
| 836 @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request')
@Creates('Cursor') | 790 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') |
| 837 Request _openCursor_3(KeyRange range, direction) native; | 791 Request _openCursor_3(KeyRange range, direction) native; |
| 838 @JSName('openCursor') | 792 @JSName('openCursor') |
| 839 @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request')
@Creates('Cursor') | 793 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') |
| 840 Request _openCursor_4(key) native; | 794 Request _openCursor_4(key) native; |
| 841 @JSName('openCursor') | 795 @JSName('openCursor') |
| 842 @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request')
@Creates('Cursor') | 796 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') |
| 843 Request _openCursor_5(key, direction) native; | 797 Request _openCursor_5(key, direction) native; |
| 844 | 798 |
| 845 /// @docsEditable true | |
| 846 Request put(/*any*/ value, [/*IDBKey*/ key]) { | 799 Request put(/*any*/ value, [/*IDBKey*/ key]) { |
| 847 if (?key) { | 800 if (?key) { |
| 848 var value_1 = convertDartToNative_SerializedScriptValue(value); | 801 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 849 var key_2 = _convertDartToNative_IDBKey(key); | 802 var key_2 = _convertDartToNative_IDBKey(key); |
| 850 return _put_1(value_1, key_2); | 803 return _put_1(value_1, key_2); |
| 851 } | 804 } |
| 852 var value_3 = convertDartToNative_SerializedScriptValue(value); | 805 var value_3 = convertDartToNative_SerializedScriptValue(value); |
| 853 return _put_2(value_3); | 806 return _put_2(value_3); |
| 854 } | 807 } |
| 855 @JSName('put') | 808 @JSName('put') |
| 856 @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Request') @_annot
ation_Creates_IDBKey | 809 @DocsEditable @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey |
| 857 Request _put_1(value, key) native; | 810 Request _put_1(value, key) native; |
| 858 @JSName('put') | 811 @JSName('put') |
| 859 @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Request') @_annot
ation_Creates_IDBKey | 812 @DocsEditable @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey |
| 860 Request _put_2(value) native; | 813 Request _put_2(value) native; |
| 861 } | 814 } |
| 862 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 815 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 863 // for details. All rights reserved. Use of this source code is governed by a | 816 // for details. All rights reserved. Use of this source code is governed by a |
| 864 // BSD-style license that can be found in the LICENSE file. | 817 // BSD-style license that can be found in the LICENSE file. |
| 865 | 818 |
| 866 | 819 |
| 867 /// @docsEditable true | 820 |
| 821 @DocsEditable |
| 868 @DomName('IDBOpenDBRequest') | 822 @DomName('IDBOpenDBRequest') |
| 869 class OpenDBRequest extends Request implements EventTarget native "*IDBOpenDBReq
uest" { | 823 class OpenDBRequest extends Request implements EventTarget native "*IDBOpenDBReq
uest" { |
| 870 | 824 |
| 871 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); | 825 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); |
| 872 | 826 |
| 873 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons
t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); | 827 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons
t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); |
| 874 | 828 |
| 875 /// @docsEditable true | 829 @DocsEditable |
| 876 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 830 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 877 OpenDBRequestEvents get on => | 831 OpenDBRequestEvents get on => |
| 878 new OpenDBRequestEvents(this); | 832 new OpenDBRequestEvents(this); |
| 879 | 833 |
| 880 Stream<Event> get onBlocked => blockedEvent.forTarget(this); | 834 Stream<Event> get onBlocked => blockedEvent.forTarget(this); |
| 881 | 835 |
| 882 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget
(this); | 836 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget
(this); |
| 883 } | 837 } |
| 884 | 838 |
| 885 /// @docsEditable true | 839 @DocsEditable |
| 886 class OpenDBRequestEvents extends RequestEvents { | 840 class OpenDBRequestEvents extends RequestEvents { |
| 887 /// @docsEditable true | 841 @DocsEditable |
| 888 OpenDBRequestEvents(EventTarget _ptr) : super(_ptr); | 842 OpenDBRequestEvents(EventTarget _ptr) : super(_ptr); |
| 889 | 843 |
| 890 /// @docsEditable true | 844 @DocsEditable |
| 891 EventListenerList get blocked => this['blocked']; | 845 EventListenerList get blocked => this['blocked']; |
| 892 | 846 |
| 893 /// @docsEditable true | 847 @DocsEditable |
| 894 EventListenerList get upgradeNeeded => this['upgradeneeded']; | 848 EventListenerList get upgradeNeeded => this['upgradeneeded']; |
| 895 } | 849 } |
| 896 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 850 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 897 // for details. All rights reserved. Use of this source code is governed by a | 851 // for details. All rights reserved. Use of this source code is governed by a |
| 898 // BSD-style license that can be found in the LICENSE file. | 852 // BSD-style license that can be found in the LICENSE file. |
| 899 | 853 |
| 900 | 854 |
| 901 /// @docsEditable true | 855 |
| 856 @DocsEditable |
| 902 @DomName('IDBRequest') | 857 @DomName('IDBRequest') |
| 903 class Request extends EventTarget native "*IDBRequest" { | 858 class Request extends EventTarget native "*IDBRequest" { |
| 904 | 859 |
| 905 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 860 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 906 | 861 |
| 907 static const EventStreamProvider<Event> successEvent = const EventStreamProvid
er<Event>('success'); | 862 static const EventStreamProvider<Event> successEvent = const EventStreamProvid
er<Event>('success'); |
| 908 | 863 |
| 909 /// @docsEditable true | 864 @DocsEditable |
| 910 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 865 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 911 RequestEvents get on => | 866 RequestEvents get on => |
| 912 new RequestEvents(this); | 867 new RequestEvents(this); |
| 913 | 868 |
| 914 /// @docsEditable true | 869 @DocsEditable @DomName('IDBRequest.error') |
| 915 @DomName('IDBRequest.error') | |
| 916 final DomError error; | 870 final DomError error; |
| 917 | 871 |
| 918 /// @docsEditable true | 872 @DocsEditable @DomName('IDBRequest.readyState') |
| 919 @DomName('IDBRequest.readyState') | |
| 920 final String readyState; | 873 final String readyState; |
| 921 | 874 |
| 922 /// @docsEditable true | |
| 923 dynamic get result => _convertNativeToDart_IDBAny(this._result); | 875 dynamic get result => _convertNativeToDart_IDBAny(this._result); |
| 924 @JSName('result') | 876 @JSName('result') |
| 925 @DomName('IDBRequest.result') @Creates('Null') | 877 @DocsEditable @DomName('IDBRequest.result') @Creates('Null') |
| 926 final dynamic _result; | 878 final dynamic _result; |
| 927 | 879 |
| 928 /// @docsEditable true | 880 @DocsEditable @DomName('IDBRequest.source') @Creates('Null') |
| 929 @DomName('IDBRequest.source') @Creates('Null') | |
| 930 final dynamic source; | 881 final dynamic source; |
| 931 | 882 |
| 932 /// @docsEditable true | 883 @DocsEditable @DomName('IDBRequest.transaction') |
| 933 @DomName('IDBRequest.transaction') | |
| 934 final Transaction transaction; | 884 final Transaction transaction; |
| 935 | 885 |
| 936 /// @docsEditable true | 886 @DocsEditable @DomName('IDBRequest.webkitErrorMessage') |
| 937 @DomName('IDBRequest.webkitErrorMessage') | |
| 938 final String webkitErrorMessage; | 887 final String webkitErrorMessage; |
| 939 | 888 |
| 940 /// @docsEditable true | |
| 941 @JSName('addEventListener') | 889 @JSName('addEventListener') |
| 942 @DomName('IDBRequest.addEventListener') | 890 @DocsEditable @DomName('IDBRequest.addEventListener') |
| 943 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 891 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 944 | 892 |
| 945 /// @docsEditable true | |
| 946 @JSName('dispatchEvent') | 893 @JSName('dispatchEvent') |
| 947 @DomName('IDBRequest.dispatchEvent') | 894 @DocsEditable @DomName('IDBRequest.dispatchEvent') |
| 948 bool $dom_dispatchEvent(Event evt) native; | 895 bool $dom_dispatchEvent(Event evt) native; |
| 949 | 896 |
| 950 /// @docsEditable true | |
| 951 @JSName('removeEventListener') | 897 @JSName('removeEventListener') |
| 952 @DomName('IDBRequest.removeEventListener') | 898 @DocsEditable @DomName('IDBRequest.removeEventListener') |
| 953 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 899 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 954 | 900 |
| 955 Stream<Event> get onError => errorEvent.forTarget(this); | 901 Stream<Event> get onError => errorEvent.forTarget(this); |
| 956 | 902 |
| 957 Stream<Event> get onSuccess => successEvent.forTarget(this); | 903 Stream<Event> get onSuccess => successEvent.forTarget(this); |
| 958 } | 904 } |
| 959 | 905 |
| 960 /// @docsEditable true | 906 @DocsEditable |
| 961 class RequestEvents extends Events { | 907 class RequestEvents extends Events { |
| 962 /// @docsEditable true | 908 @DocsEditable |
| 963 RequestEvents(EventTarget _ptr) : super(_ptr); | 909 RequestEvents(EventTarget _ptr) : super(_ptr); |
| 964 | 910 |
| 965 /// @docsEditable true | 911 @DocsEditable |
| 966 EventListenerList get error => this['error']; | 912 EventListenerList get error => this['error']; |
| 967 | 913 |
| 968 /// @docsEditable true | 914 @DocsEditable |
| 969 EventListenerList get success => this['success']; | 915 EventListenerList get success => this['success']; |
| 970 } | 916 } |
| 971 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 917 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 972 // for details. All rights reserved. Use of this source code is governed by a | 918 // for details. All rights reserved. Use of this source code is governed by a |
| 973 // BSD-style license that can be found in the LICENSE file. | 919 // BSD-style license that can be found in the LICENSE file. |
| 974 | 920 |
| 975 | 921 |
| 976 /// @docsEditable true | 922 |
| 923 @DocsEditable |
| 977 @DomName('IDBTransaction') | 924 @DomName('IDBTransaction') |
| 978 class Transaction extends EventTarget native "*IDBTransaction" { | 925 class Transaction extends EventTarget native "*IDBTransaction" { |
| 979 | 926 |
| 980 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); | 927 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); |
| 981 | 928 |
| 982 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); | 929 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); |
| 983 | 930 |
| 984 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 931 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 985 | 932 |
| 986 /// @docsEditable true | 933 @DocsEditable |
| 987 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 934 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 988 TransactionEvents get on => | 935 TransactionEvents get on => |
| 989 new TransactionEvents(this); | 936 new TransactionEvents(this); |
| 990 | 937 |
| 991 /// @docsEditable true | 938 @DocsEditable @DomName('IDBTransaction.db') |
| 992 @DomName('IDBTransaction.db') | |
| 993 final Database db; | 939 final Database db; |
| 994 | 940 |
| 995 /// @docsEditable true | 941 @DocsEditable @DomName('IDBTransaction.error') |
| 996 @DomName('IDBTransaction.error') | |
| 997 final DomError error; | 942 final DomError error; |
| 998 | 943 |
| 999 /// @docsEditable true | 944 @DocsEditable @DomName('IDBTransaction.mode') |
| 1000 @DomName('IDBTransaction.mode') | |
| 1001 final String mode; | 945 final String mode; |
| 1002 | 946 |
| 1003 /// @docsEditable true | 947 @DocsEditable @DomName('IDBTransaction.webkitErrorMessage') |
| 1004 @DomName('IDBTransaction.webkitErrorMessage') | |
| 1005 final String webkitErrorMessage; | 948 final String webkitErrorMessage; |
| 1006 | 949 |
| 1007 /// @docsEditable true | 950 @DocsEditable @DomName('IDBTransaction.abort') |
| 1008 @DomName('IDBTransaction.abort') | |
| 1009 void abort() native; | 951 void abort() native; |
| 1010 | 952 |
| 1011 /// @docsEditable true | |
| 1012 @JSName('addEventListener') | 953 @JSName('addEventListener') |
| 1013 @DomName('IDBTransaction.addEventListener') | 954 @DocsEditable @DomName('IDBTransaction.addEventListener') |
| 1014 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 955 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 1015 | 956 |
| 1016 /// @docsEditable true | |
| 1017 @JSName('dispatchEvent') | 957 @JSName('dispatchEvent') |
| 1018 @DomName('IDBTransaction.dispatchEvent') | 958 @DocsEditable @DomName('IDBTransaction.dispatchEvent') |
| 1019 bool $dom_dispatchEvent(Event evt) native; | 959 bool $dom_dispatchEvent(Event evt) native; |
| 1020 | 960 |
| 1021 /// @docsEditable true | 961 @DocsEditable @DomName('IDBTransaction.objectStore') |
| 1022 @DomName('IDBTransaction.objectStore') | |
| 1023 ObjectStore objectStore(String name) native; | 962 ObjectStore objectStore(String name) native; |
| 1024 | 963 |
| 1025 /// @docsEditable true | |
| 1026 @JSName('removeEventListener') | 964 @JSName('removeEventListener') |
| 1027 @DomName('IDBTransaction.removeEventListener') | 965 @DocsEditable @DomName('IDBTransaction.removeEventListener') |
| 1028 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 966 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 1029 | 967 |
| 1030 Stream<Event> get onAbort => abortEvent.forTarget(this); | 968 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 1031 | 969 |
| 1032 Stream<Event> get onComplete => completeEvent.forTarget(this); | 970 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 1033 | 971 |
| 1034 Stream<Event> get onError => errorEvent.forTarget(this); | 972 Stream<Event> get onError => errorEvent.forTarget(this); |
| 1035 } | 973 } |
| 1036 | 974 |
| 1037 /// @docsEditable true | 975 @DocsEditable |
| 1038 class TransactionEvents extends Events { | 976 class TransactionEvents extends Events { |
| 1039 /// @docsEditable true | 977 @DocsEditable |
| 1040 TransactionEvents(EventTarget _ptr) : super(_ptr); | 978 TransactionEvents(EventTarget _ptr) : super(_ptr); |
| 1041 | 979 |
| 1042 /// @docsEditable true | 980 @DocsEditable |
| 1043 EventListenerList get abort => this['abort']; | 981 EventListenerList get abort => this['abort']; |
| 1044 | 982 |
| 1045 /// @docsEditable true | 983 @DocsEditable |
| 1046 EventListenerList get complete => this['complete']; | 984 EventListenerList get complete => this['complete']; |
| 1047 | 985 |
| 1048 /// @docsEditable true | 986 @DocsEditable |
| 1049 EventListenerList get error => this['error']; | 987 EventListenerList get error => this['error']; |
| 1050 } | 988 } |
| 1051 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 989 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1052 // for details. All rights reserved. Use of this source code is governed by a | 990 // for details. All rights reserved. Use of this source code is governed by a |
| 1053 // BSD-style license that can be found in the LICENSE file. | 991 // BSD-style license that can be found in the LICENSE file. |
| 1054 | 992 |
| 1055 | 993 |
| 1056 /// @docsEditable true | 994 |
| 995 @DocsEditable |
| 1057 @DomName('IDBVersionChangeEvent') | 996 @DomName('IDBVersionChangeEvent') |
| 1058 class UpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" { | 997 class UpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" { |
| 1059 | 998 |
| 1060 /// @docsEditable true | 999 @DocsEditable @DomName('IDBUpgradeNeededEvent.newVersion') |
| 1061 @DomName('IDBUpgradeNeededEvent.newVersion') | |
| 1062 final int newVersion; | 1000 final int newVersion; |
| 1063 | 1001 |
| 1064 /// @docsEditable true | 1002 @DocsEditable @DomName('IDBUpgradeNeededEvent.oldVersion') |
| 1065 @DomName('IDBUpgradeNeededEvent.oldVersion') | |
| 1066 final int oldVersion; | 1003 final int oldVersion; |
| 1067 } | 1004 } |
| 1068 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1005 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1069 // for details. All rights reserved. Use of this source code is governed by a | 1006 // for details. All rights reserved. Use of this source code is governed by a |
| 1070 // BSD-style license that can be found in the LICENSE file. | 1007 // BSD-style license that can be found in the LICENSE file. |
| 1071 | 1008 |
| 1072 | 1009 |
| 1073 /// @docsEditable true | 1010 |
| 1011 @DocsEditable |
| 1074 @DomName('IDBVersionChangeEvent') | 1012 @DomName('IDBVersionChangeEvent') |
| 1075 class VersionChangeEvent extends Event native "*IDBVersionChangeEvent" { | 1013 class VersionChangeEvent extends Event native "*IDBVersionChangeEvent" { |
| 1076 | 1014 |
| 1077 /// @docsEditable true | 1015 @DocsEditable @DomName('IDBVersionChangeEvent.version') |
| 1078 @DomName('IDBVersionChangeEvent.version') | |
| 1079 final String version; | 1016 final String version; |
| 1080 } | 1017 } |
| 1081 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1018 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1082 // for details. All rights reserved. Use of this source code is governed by a | 1019 // for details. All rights reserved. Use of this source code is governed by a |
| 1083 // BSD-style license that can be found in the LICENSE file. | 1020 // BSD-style license that can be found in the LICENSE file. |
| 1084 | 1021 |
| 1085 | 1022 |
| 1086 /// @docsEditable true | 1023 |
| 1024 @DocsEditable |
| 1087 @DomName('IDBVersionChangeRequest') | 1025 @DomName('IDBVersionChangeRequest') |
| 1088 class VersionChangeRequest extends Request implements EventTarget native "*IDBVe
rsionChangeRequest" { | 1026 class VersionChangeRequest extends Request implements EventTarget native "*IDBVe
rsionChangeRequest" { |
| 1089 | 1027 |
| 1090 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); | 1028 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); |
| 1091 | 1029 |
| 1092 /// @docsEditable true | 1030 @DocsEditable |
| 1093 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 1031 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 1094 VersionChangeRequestEvents get on => | 1032 VersionChangeRequestEvents get on => |
| 1095 new VersionChangeRequestEvents(this); | 1033 new VersionChangeRequestEvents(this); |
| 1096 | 1034 |
| 1097 Stream<Event> get onBlocked => blockedEvent.forTarget(this); | 1035 Stream<Event> get onBlocked => blockedEvent.forTarget(this); |
| 1098 } | 1036 } |
| 1099 | 1037 |
| 1100 /// @docsEditable true | 1038 @DocsEditable |
| 1101 class VersionChangeRequestEvents extends RequestEvents { | 1039 class VersionChangeRequestEvents extends RequestEvents { |
| 1102 /// @docsEditable true | 1040 @DocsEditable |
| 1103 VersionChangeRequestEvents(EventTarget _ptr) : super(_ptr); | 1041 VersionChangeRequestEvents(EventTarget _ptr) : super(_ptr); |
| 1104 | 1042 |
| 1105 /// @docsEditable true | 1043 @DocsEditable |
| 1106 EventListenerList get blocked => this['blocked']; | 1044 EventListenerList get blocked => this['blocked']; |
| 1107 } | 1045 } |
| 1108 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1046 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1109 // for details. All rights reserved. Use of this source code is governed by a | 1047 // for details. All rights reserved. Use of this source code is governed by a |
| 1110 // BSD-style license that can be found in the LICENSE file. | 1048 // BSD-style license that can be found in the LICENSE file. |
| 1111 | 1049 |
| 1112 | 1050 |
| 1113 /// @docsEditable true | 1051 |
| 1052 @DocsEditable |
| 1114 @DomName('IDBAny') | 1053 @DomName('IDBAny') |
| 1115 class _Any native "*IDBAny" { | 1054 class _Any native "*IDBAny" { |
| 1116 } | 1055 } |
| OLD | NEW |