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

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, 5 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 import 'dart:_interceptors' show JSExtendableArray; 9 import 'dart:_interceptors' show JSExtendableArray;
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>, 262 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>,
263 // and copy to JavaScript array if necessary. 263 // and copy to JavaScript array if necessary.
264 264
265 // Try and create a transaction with a string mode. Browsers that expect a 265 // Try and create a transaction with a string mode. Browsers that expect a
266 // numeric mode tend to convert the string into a number. This fails 266 // numeric mode tend to convert the string into a number. This fails
267 // silently, resulting in zero ('readonly'). 267 // silently, resulting in zero ('readonly').
268 return _transaction(storeName_OR_storeNames, mode); 268 return _transaction(storeName_OR_storeNames, mode);
269 } 269 }
270 270
271 Transaction transactionStore(String storeName, String mode) {
272 if (mode != 'readonly' && mode != 'readwrite') {
273 throw new ArgumentError(mode);
274 }
275 // Try and create a transaction with a string mode. Browsers that expect a
276 // numeric mode tend to convert the string into a number. This fails
277 // silently, resulting in zero ('readonly').
278 return _transaction(storeName, mode);
279 }
280
281 Transaction transactionList(List<String> storeNames, String mode) {
282 if (mode != 'readonly' && mode != 'readwrite') {
283 throw new ArgumentError(mode);
284 }
285 List storeNames_1 = convertDartToNative_StringArray(storeNames);
286 return _transaction(storeNames_1, mode);
287 }
288
289 Transaction transactionStores(DomStringList storeNames, String mode) {
290 if (mode != 'readonly' && mode != 'readwrite') {
291 throw new ArgumentError(mode);
292 }
293 return _transaction(storeNames_1, mode);
294 }
295
271 @JSName('transaction') 296 @JSName('transaction')
272 Transaction _transaction(stores, mode) native; 297 Transaction _transaction(stores, mode) native;
273 298
274 299
275 @DomName('IDBDatabase.abortEvent') 300 @DomName('IDBDatabase.abortEvent')
276 @DocsEditable 301 @DocsEditable
277 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort'); 302 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort');
278 303
279 @DomName('IDBDatabase.errorEvent') 304 @DomName('IDBDatabase.errorEvent')
280 @DocsEditable 305 @DocsEditable
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1298 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1274 // for details. All rights reserved. Use of this source code is governed by a 1299 // for details. All rights reserved. Use of this source code is governed by a
1275 // BSD-style license that can be found in the LICENSE file. 1300 // BSD-style license that can be found in the LICENSE file.
1276 1301
1277 1302
1278 @DocsEditable 1303 @DocsEditable
1279 @DomName('IDBAny') 1304 @DomName('IDBAny')
1280 @deprecated // nonstandard 1305 @deprecated // nonstandard
1281 abstract class _IDBAny native "IDBAny" { 1306 abstract class _IDBAny native "IDBAny" {
1282 } 1307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698