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