diff options
author | praschke <stel@comfy.monster> | 2023-09-30 17:17:31 +0100 |
---|---|---|
committer | praschke <stel@comfy.monster> | 2023-09-30 17:56:52 +0100 |
commit | 6769ff501c8b5d20e9056de57eff5a62a92339d3 (patch) | |
tree | ee22b630a52fb802d357bb85c170c366e3f81ed7 /ext/js/comm/api.js | |
parent | 0fa8d441a269b13474e6ad4108f49497d4d3abfd (diff) |
create both cross-frame ports in the background
on Chrome (currently 117), the port created in the content script with
runtime.connect does not properly receive an onDisconnect event when
the service worker sleeps. the port created in the background with
tabs.connect does receive the event, so create both ports with
tabs.connect.
fixes #241.
Diffstat (limited to 'ext/js/comm/api.js')
-rw-r--r-- | ext/js/comm/api.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/js/comm/api.js b/ext/js/comm/api.js index de12bb6c..72d2ba07 100644 --- a/ext/js/comm/api.js +++ b/ext/js/comm/api.js @@ -181,6 +181,10 @@ class API { return this._invoke('loadExtensionScripts', {files}); } + openCrossFramePort(targetTabId, targetFrameId) { + return this._invoke('openCrossFramePort', {targetTabId, targetFrameId}); + } + // Utilities _createActionPort(timeout=5000) { |