diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-01-31 18:06:13 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-01-31 18:06:13 +0100 |
commit | ad69f9c86b950cc84ca103e65824b9c9129d3999 (patch) | |
tree | a4314c8a5031b9fb2a278021b2388b86190c2823 /common/broadcast.js | |
parent | 4c6a2323d90e9321ec2b78e226167b3013ea69ab (diff) | |
download | browser-extension-ad69f9c86b950cc84ca103e65824b9c9129d3999.tar.gz browser-extension-ad69f9c86b950cc84ca103e65824b9c9129d3999.zip |
add support for testing with other browsers (especially Abrowser and Librewolf)
There are still some spurious failures when running under those newer browsers. Those will be systematically investigated and fixed.
Diffstat (limited to 'common/broadcast.js')
-rw-r--r-- | common/broadcast.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/broadcast.js b/common/broadcast.js index 4dcac2b..4fc5237 100644 --- a/common/broadcast.js +++ b/common/broadcast.js @@ -46,6 +46,7 @@ function sender_connection() { return { + type: "sender", port: connect_to_background("broadcast_send") }; } @@ -92,6 +93,7 @@ function flush(sender_conn) function listener_connection(cb) { const conn = { + type: "listener", port: connect_to_background("broadcast_listen") }; @@ -115,6 +117,8 @@ function unsubscribe(listener_conn, channel_name) function close(conn) { + if (conn.type === "sender") + flush(conn); conn.port.disconnect(); } #EXPORT close |