aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-06 19:27:21 -0400
committerGitHub <noreply@github.com>2020-05-06 19:27:21 -0400
commit501281e887fb66b490f90e7593639112b058ab97 (patch)
tree06b48bdd813ec6bf743c4bac7ccafa7f832e7182 /ext/mixed
parentac2f743b76b92c46624cab87cd0f6630256738e4 (diff)
Popup init update (#497)
* Add API function to send a message to a specific frameId in a tab * Update _windowMessageHandlers to support additional info per handler * Remove message token * Add new authorization check * Set up new initialization handler * Update initialization * Remove message token * Replace 'prepare' with 'configure' * Create new prepare function * Change configure guard * Log errors in onMessage * Improve popup initialize function * Clear secret/token in _resetFrame * Remove backend message token * Clear src and srcdoc attributes before loading * Don't treat about:blank unloads as load events
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/api.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js
index bf85338e..ca4bdd6c 100644
--- a/ext/mixed/js/api.js
+++ b/ext/mixed/js/api.js
@@ -76,6 +76,10 @@ function apiScreenshotGet(options) {
return _apiInvoke('screenshotGet', {options});
}
+function apiSendMessageToFrame(frameId, action, params) {
+ return _apiInvoke('sendMessageToFrame', {frameId, action, params});
+}
+
function apiBroadcastTab(action, params) {
return _apiInvoke('broadcastTab', {action, params});
}
@@ -108,10 +112,6 @@ function apiGetZoom() {
return _apiInvoke('getZoom');
}
-function apiGetMessageToken() {
- return _apiInvoke('getMessageToken');
-}
-
function apiGetDefaultAnkiFieldTemplates() {
return _apiInvoke('getDefaultAnkiFieldTemplates');
}