From ad69f9c86b950cc84ca103e65824b9c9129d3999 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 31 Jan 2022 18:06:13 +0100 Subject: 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. --- common/broadcast.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/broadcast.js') 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 -- cgit v1.2.3