| OLD | NEW |
| 1 library dart.dom.indexed_db; | 1 library dart.dom.indexed_db; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 6 import 'dart:_js_helper' show Creates, Returns, JSName, Null; | 6 import 'dart:_js_helper' show Creates, Returns, JSName, Null; |
| 7 import 'dart:_foreign_helper' show JS; | 7 import 'dart:_foreign_helper' show JS; |
| 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9 // for details. All rights reserved. Use of this source code is governed by a | 9 // for details. All rights reserved. Use of this source code is governed by a |
| 10 // BSD-style license that can be found in the LICENSE file. | 10 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 183 } |
| 184 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 184 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 185 // for details. All rights reserved. Use of this source code is governed by a | 185 // for details. All rights reserved. Use of this source code is governed by a |
| 186 // BSD-style license that can be found in the LICENSE file. | 186 // BSD-style license that can be found in the LICENSE file. |
| 187 | 187 |
| 188 | 188 |
| 189 @DocsEditable | 189 @DocsEditable |
| 190 @DomName('IDBCursorWithValue') | 190 @DomName('IDBCursorWithValue') |
| 191 class CursorWithValue extends Cursor native "*IDBCursorWithValue" { | 191 class CursorWithValue extends Cursor native "*IDBCursorWithValue" { |
| 192 | 192 |
| 193 dynamic get value => _convertNativeToDart_IDBAny(this._value); |
| 194 @JSName('value') |
| 193 @DomName('IDBCursorWithValue.value') | 195 @DomName('IDBCursorWithValue.value') |
| 194 @DocsEditable | 196 @DocsEditable |
| 195 @annotation_Creates_SerializedScriptValue | 197 @annotation_Creates_SerializedScriptValue |
| 196 @annotation_Returns_SerializedScriptValue | 198 @annotation_Returns_SerializedScriptValue |
| 197 final Object value; | 199 final dynamic _value; |
| 198 } | 200 } |
| 199 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 201 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 200 // for details. All rights reserved. Use of this source code is governed by a | 202 // for details. All rights reserved. Use of this source code is governed by a |
| 201 // BSD-style license that can be found in the LICENSE file. | 203 // BSD-style license that can be found in the LICENSE file. |
| 202 | 204 |
| 203 | 205 |
| 204 @DomName('IDBDatabase') | 206 @DomName('IDBDatabase') |
| 205 @SupportedBrowser(SupportedBrowser.CHROME) | 207 @SupportedBrowser(SupportedBrowser.CHROME) |
| 206 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') | 208 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') |
| 207 @SupportedBrowser(SupportedBrowser.IE, '10') | 209 @SupportedBrowser(SupportedBrowser.IE, '10') |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 * // called when there are no more cursors. | 611 * // called when there are no more cursors. |
| 610 * print('all done!'); | 612 * print('all done!'); |
| 611 * }); | 613 * }); |
| 612 * | 614 * |
| 613 * Asynchronous operations which are not related to the current transaction | 615 * Asynchronous operations which are not related to the current transaction |
| 614 * will cause the transaction to automatically be committed-- all processing | 616 * will cause the transaction to automatically be committed-- all processing |
| 615 * must be done synchronously unless they are additional async requests to | 617 * must be done synchronously unless they are additional async requests to |
| 616 * the current transaction. | 618 * the current transaction. |
| 617 */ | 619 */ |
| 618 @DomName('IDBObjectStore.openCursor') | 620 @DomName('IDBObjectStore.openCursor') |
| 619 Stream<Cursor> openCursor({key, KeyRange range, String direction, | 621 Stream<CursorWithValue> openCursor({key, KeyRange range, String direction, |
| 620 bool autoAdvance}) { | 622 bool autoAdvance}) { |
| 621 var key_OR_range = null; | 623 var key_OR_range = null; |
| 622 if (key != null) { | 624 if (key != null) { |
| 623 if (range != null) { | 625 if (range != null) { |
| 624 throw new ArgumentError('Cannot specify both key and range.'); | 626 throw new ArgumentError('Cannot specify both key and range.'); |
| 625 } | 627 } |
| 626 key_OR_range = key; | 628 key_OR_range = key; |
| 627 } else { | 629 } else { |
| 628 key_OR_range = range; | 630 key_OR_range = range; |
| 629 } | 631 } |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 } | 1099 } |
| 1098 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1100 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1099 // for details. All rights reserved. Use of this source code is governed by a | 1101 // for details. All rights reserved. Use of this source code is governed by a |
| 1100 // BSD-style license that can be found in the LICENSE file. | 1102 // BSD-style license that can be found in the LICENSE file. |
| 1101 | 1103 |
| 1102 | 1104 |
| 1103 @DocsEditable | 1105 @DocsEditable |
| 1104 @DomName('IDBAny') | 1106 @DomName('IDBAny') |
| 1105 class _IDBAny native "*IDBAny" { | 1107 class _IDBAny native "*IDBAny" { |
| 1106 } | 1108 } |
| OLD | NEW |