Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 12181021: Revert IDB optional mode parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/html/indexeddb_1_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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';
211 if (mode != 'readonly' && mode != 'readwrite') { 210 if (mode != 'readonly' && mode != 'readwrite') {
212 throw new ArgumentError(mode); 211 throw new ArgumentError(mode);
213 } 212 }
214 213
215 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>, 214 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>,
216 // and copy to JavaScript array if necessary. 215 // and copy to JavaScript array if necessary.
217 216
218 // Try and create a transaction with a string mode. Browsers that expect a 217 // Try and create a transaction with a string mode. Browsers that expect a
219 // numeric mode tend to convert the string into a number. This fails 218 // numeric mode tend to convert the string into a number. This fails
220 // silently, resulting in zero ('readonly'). 219 // silently, resulting in zero ('readonly').
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 } 925 }
927 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 926 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
928 // for details. All rights reserved. Use of this source code is governed by a 927 // for details. All rights reserved. Use of this source code is governed by a
929 // BSD-style license that can be found in the LICENSE file. 928 // BSD-style license that can be found in the LICENSE file.
930 929
931 930
932 @DocsEditable 931 @DocsEditable
933 @DomName('IDBAny') 932 @DomName('IDBAny')
934 class _IDBAny native "*IDBAny" { 933 class _IDBAny native "*IDBAny" {
935 } 934 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/indexeddb_1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698