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