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..143b2bda6cd51f31a28de3c8e5ad4392167bbf17 100644 |
--- a/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate |
@@ -22,18 +22,29 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
} |
$if DART2JS |
- Transaction transaction(storeName_OR_storeNames, String mode) { |
+ Transaction transaction(String storeName, String mode) { |
if (mode != 'readonly' && mode != 'readwrite') { |
throw new ArgumentError(mode); |
} |
- |
- // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>, |
- // and copy to JavaScript array if necessary. |
- |
// 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_OR_storeNames, mode); |
+ 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 transactionStringList(DomStringList storeNames, String mode) { |
+ if (mode != 'readonly' && mode != 'readwrite') { |
+ throw new ArgumentError(mode); |
+ } |
+ return _transaction(storeNames_1, mode); |
} |
@JSName('transaction') |