aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 5c5da2dd..e9b50789 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -420,7 +420,14 @@ class Backend {
}
_onApiForward({action, params}, sender) {
- return apiForward(action, params, sender);
+ if (!(sender && sender.tab)) {
+ return Promise.resolve();
+ }
+
+ const tabId = sender.tab.id;
+ return new Promise((resolve) => {
+ chrome.tabs.sendMessage(tabId, {action, params}, (response) => resolve(response));
+ });
}
_onApiFrameInformationGet(params, sender) {