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

Unified Diff: tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate

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 side-by-side diff with in-line comments
Download patch
Index: tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate b/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
index fc77a04e9415a53deae83680e8e9ee18e1084e11..b58b364c7c7472e90d125615020e086a17b0ccd2 100644
--- a/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
@@ -36,6 +36,31 @@ $if DART2JS
return _transaction(storeName_OR_storeNames, mode);
}
+ Transaction transactionStore(String storeName, String mode) {
+ if (mode != 'readonly' && mode != 'readwrite') {
+ throw new ArgumentError(mode);
+ }
+ // Try and create a transaction with a string mode. Browsers that expect a
+ // numeric mode tend to convert the string into a number. This fails
+ // silently, resulting in zero ('readonly').
+ return _transaction(storeName, mode);
+ }
+
+ Transaction transactionList(List<String> storeNames, String mode) {
+ if (mode != 'readonly' && mode != 'readwrite') {
+ throw new ArgumentError(mode);
+ }
+ List storeNames_1 = convertDartToNative_StringArray(storeNames);
+ return _transaction(storeNames_1, mode);
+ }
+
+ Transaction transactionStores(DomStringList storeNames, String mode) {
+ if (mode != 'readonly' && mode != 'readwrite') {
+ throw new ArgumentError(mode);
+ }
+ return _transaction(storeNames_1, mode);
+ }
+
@JSName('transaction')
Transaction _transaction(stores, mode) native;
$endif
« no previous file with comments | « tools/dom/templates/html/impl/impl_AudioNode.darttemplate ('k') | tools/dom/templates/html/impl/impl_Navigator.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698