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 e9255571ddd94de6c4fcdc7f0fb6f82bf09accf6..65872f43d78d3ad45796c5fcb4b4f18edaf8100c 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, mode); |
+ } |
+ |
@JSName('transaction') |
Transaction _transaction(stores, mode) native; |
$endif |