summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/eventsource.sharedworker.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/eventsource.sharedworker.js')
-rw-r--r--web_src/js/features/eventsource.sharedworker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/eventsource.sharedworker.js b/web_src/js/features/eventsource.sharedworker.js
index 6f7b2a2e4d..824ccfea79 100644
--- a/web_src/js/features/eventsource.sharedworker.js
+++ b/web_src/js/features/eventsource.sharedworker.js
@@ -67,7 +67,7 @@ class Source {
}
}
-self.onconnect = (e) => {
+self.addEventListener('connect', (e) => {
for (const port of e.ports) {
port.addEventListener('message', (event) => {
if (event.data.type === 'start') {
@@ -131,4 +131,4 @@ self.onconnect = (e) => {
});
port.start();
}
-};
+});