aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/api.js')
-rw-r--r--ext/mixed/js/api.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js
index ca4bdd6c..af97ac3d 100644
--- a/ext/mixed/js/api.js
+++ b/ext/mixed/js/api.js
@@ -152,6 +152,14 @@ function apiLogIndicatorClear() {
return _apiInvoke('logIndicatorClear');
}
+function apiImportDictionaryArchive(archiveContent, details, onProgress) {
+ return _apiInvokeWithProgress('importDictionaryArchive', {archiveContent, details}, onProgress);
+}
+
+function apiDeleteDictionary(dictionaryName, onProgress) {
+ return _apiInvokeWithProgress('deleteDictionary', {dictionaryName}, onProgress);
+}
+
function _apiCreateActionPort(timeout=5000) {
return new Promise((resolve, reject) => {
let timer = null;
@@ -213,7 +221,7 @@ function _apiInvokeWithProgress(action, params, onProgress, timeout=5000) {
break;
case 'progress':
try {
- onProgress(message.data);
+ onProgress(...message.data);
} catch (e) {
// NOP
}