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

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

Issue 16494002: Expand overloaded methods and optional parameters in the html library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
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:typed_data'; 6 import 'dart:typed_data';
7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null;
8 import 'dart:_foreign_helper' show JS; 8 import 'dart:_foreign_helper' show JS;
9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
10 // for details. All rights reserved. Use of this source code is governed by a 10 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>, 261 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>,
262 // and copy to JavaScript array if necessary. 262 // and copy to JavaScript array if necessary.
263 263
264 // Try and create a transaction with a string mode. Browsers that expect a 264 // Try and create a transaction with a string mode. Browsers that expect a
265 // numeric mode tend to convert the string into a number. This fails 265 // numeric mode tend to convert the string into a number. This fails
266 // silently, resulting in zero ('readonly'). 266 // silently, resulting in zero ('readonly').
267 return _transaction(storeName_OR_storeNames, mode); 267 return _transaction(storeName_OR_storeNames, mode);
268 } 268 }
269 269
270 Transaction transactionString(String storeName, String mode) {
blois 2013/06/24 16:58:02 can this be transactionStore and transactionStores
Emily Fortuna 2013/06/25 03:53:31 Done.
271 if (mode != 'readonly' && mode != 'readwrite') {
272 throw new ArgumentError(mode);
273 }
274 // Try and create a transaction with a string mode. Browsers that expect a
275 // numeric mode tend to convert the string into a number. This fails
276 // silently, resulting in zero ('readonly').
277 return _transaction(storeName, mode);
278 }
279
280 Transaction transactionList(List<String> storeNames, String mode) {
281 if (mode != 'readonly' && mode != 'readwrite') {
282 throw new ArgumentError(mode);
283 }
284 List storeNames_1 = convertDartToNative_StringArray(storeNames);
285 return _transaction(storeNames_1, mode);
286 }
287
288 Transaction transactionStringList(DomStringList storeNames, String mode) {
289 if (mode != 'readonly' && mode != 'readwrite') {
290 throw new ArgumentError(mode);
291 }
292 return _transaction(storeNames_1, mode);
293 }
294
270 @JSName('transaction') 295 @JSName('transaction')
271 Transaction _transaction(stores, mode) native; 296 Transaction _transaction(stores, mode) native;
272 297
273 298
274 @DomName('IDBDatabase.abortEvent') 299 @DomName('IDBDatabase.abortEvent')
275 @DocsEditable 300 @DocsEditable
276 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort'); 301 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort');
277 302
278 @DomName('IDBDatabase.errorEvent') 303 @DomName('IDBDatabase.errorEvent')
279 @DocsEditable 304 @DocsEditable
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1297 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1273 // for details. All rights reserved. Use of this source code is governed by a 1298 // for details. All rights reserved. Use of this source code is governed by a
1274 // BSD-style license that can be found in the LICENSE file. 1299 // BSD-style license that can be found in the LICENSE file.
1275 1300
1276 1301
1277 @DocsEditable 1302 @DocsEditable
1278 @DomName('IDBAny') 1303 @DomName('IDBAny')
1279 @deprecated // nonstandard 1304 @deprecated // nonstandard
1280 abstract class _IDBAny native "IDBAny" { 1305 abstract class _IDBAny native "IDBAny" {
1281 } 1306 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698