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