| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // BSD-style license that can be found in the LICENSE file. | 199 // BSD-style license that can be found in the LICENSE file. |
| 200 | 200 |
| 201 | 201 |
| 202 @DomName('IDBDatabase') | 202 @DomName('IDBDatabase') |
| 203 @SupportedBrowser(SupportedBrowser.CHROME) | 203 @SupportedBrowser(SupportedBrowser.CHROME) |
| 204 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') | 204 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') |
| 205 @SupportedBrowser(SupportedBrowser.IE, '10') | 205 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 206 @Experimental | 206 @Experimental |
| 207 class Database extends EventTarget native "*IDBDatabase" { | 207 class Database extends EventTarget native "*IDBDatabase" { |
| 208 | 208 |
| 209 Transaction transaction(storeName_OR_storeNames, String mode) { | 209 Transaction transaction(storeName_OR_storeNames, {String mode}) { |
| 210 if (mode == null) mode = 'readonly'; |
| 210 if (mode != 'readonly' && mode != 'readwrite') { | 211 if (mode != 'readonly' && mode != 'readwrite') { |
| 211 throw new ArgumentError(mode); | 212 throw new ArgumentError(mode); |
| 212 } | 213 } |
| 213 | 214 |
| 214 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>, | 215 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>, |
| 215 // and copy to JavaScript array if necessary. | 216 // and copy to JavaScript array if necessary. |
| 216 | 217 |
| 217 // Try and create a transaction with a string mode. Browsers that expect a | 218 // Try and create a transaction with a string mode. Browsers that expect a |
| 218 // numeric mode tend to convert the string into a number. This fails | 219 // numeric mode tend to convert the string into a number. This fails |
| 219 // silently, resulting in zero ('readonly'). | 220 // silently, resulting in zero ('readonly'). |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 } | 926 } |
| 926 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 927 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 927 // for details. All rights reserved. Use of this source code is governed by a | 928 // for details. All rights reserved. Use of this source code is governed by a |
| 928 // BSD-style license that can be found in the LICENSE file. | 929 // BSD-style license that can be found in the LICENSE file. |
| 929 | 930 |
| 930 | 931 |
| 931 @DocsEditable | 932 @DocsEditable |
| 932 @DomName('IDBAny') | 933 @DomName('IDBAny') |
| 933 class _IDBAny native "*IDBAny" { | 934 class _IDBAny native "*IDBAny" { |
| 934 } | 935 } |
| OLD | NEW |