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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 //TODO: Report stacktrace once issue 4061 is resolved. | 1007 //TODO: Report stacktrace once issue 4061 is resolved. |
1008 controller.addError(e); | 1008 controller.addError(e); |
1009 }); | 1009 }); |
1010 | 1010 |
1011 request.onSuccess.listen((e) { | 1011 request.onSuccess.listen((e) { |
1012 Cursor cursor = request.result; | 1012 Cursor cursor = request.result; |
1013 if (cursor == null) { | 1013 if (cursor == null) { |
1014 controller.close(); | 1014 controller.close(); |
1015 } else { | 1015 } else { |
1016 controller.add(cursor); | 1016 controller.add(cursor); |
1017 if (autoAdvance == true && controller.hasSubscribers) { | 1017 if (autoAdvance == true && controller.hasListener) { |
1018 cursor.next(); | 1018 cursor.next(); |
1019 } | 1019 } |
1020 } | 1020 } |
1021 }); | 1021 }); |
1022 return controller.stream; | 1022 return controller.stream; |
1023 } | 1023 } |
1024 } | 1024 } |
1025 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1025 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1026 // for details. All rights reserved. Use of this source code is governed by a | 1026 // for details. All rights reserved. Use of this source code is governed by a |
1027 // BSD-style license that can be found in the LICENSE file. | 1027 // BSD-style license that can be found in the LICENSE file. |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 } | 1238 } |
1239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1240 // for details. All rights reserved. Use of this source code is governed by a | 1240 // for details. All rights reserved. Use of this source code is governed by a |
1241 // BSD-style license that can be found in the LICENSE file. | 1241 // BSD-style license that can be found in the LICENSE file. |
1242 | 1242 |
1243 | 1243 |
1244 @DocsEditable | 1244 @DocsEditable |
1245 @DomName('IDBAny') | 1245 @DomName('IDBAny') |
1246 abstract class _IDBAny native "*IDBAny" { | 1246 abstract class _IDBAny native "*IDBAny" { |
1247 } | 1247 } |
OLD | NEW |