summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js8
-rw-r--r--ext/bg/js/search.js1
2 files changed, 6 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 4791bfb5..6e594f9b 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -538,14 +538,15 @@ class Backend {
});
}
- _onApiSendMessageToFrame({frameId, action, params}, sender) {
+ _onApiSendMessageToFrame({frameId: targetFrameId, action, params}, sender) {
if (!(sender && sender.tab)) {
return false;
}
const tabId = sender.tab.id;
+ const frameId = sender.frameId;
const callback = () => this._checkLastError(chrome.runtime.lastError);
- chrome.tabs.sendMessage(tabId, {action, params}, {frameId}, callback);
+ chrome.tabs.sendMessage(tabId, {action, params, frameId}, {frameId: targetFrameId}, callback);
return true;
}
@@ -555,8 +556,9 @@ class Backend {
}
const tabId = sender.tab.id;
+ const frameId = sender.frameId;
const callback = () => this._checkLastError(chrome.runtime.lastError);
- chrome.tabs.sendMessage(tabId, {action, params}, callback);
+ chrome.tabs.sendMessage(tabId, {action, params, frameId}, callback);
return true;
}
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 239027f7..9bbc66f2 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -424,6 +424,7 @@ class DisplaySearch extends Display {
async _setupNestedPopups() {
await dynamicLoader.loadScripts([
'/mixed/js/text-scanner.js',
+ '/mixed/js/frame-client.js',
'/fg/js/frame-offset-forwarder.js',
'/fg/js/popup.js',
'/fg/js/popup-factory.js',