From c9d9c421bc7e3f2a9d5d5ed05679cb3e8e06a388 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 5 Nov 2024 11:04:14 +0000 Subject: [PATCH] Move navigator message listener registration to be synchronously attached (#28340) to silence Chrome warning Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/platform/WebPlatform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/platform/WebPlatform.ts b/src/vector/platform/WebPlatform.ts index 53ff14d82f..0bbc7a0a5a 100644 --- a/src/vector/platform/WebPlatform.ts +++ b/src/vector/platform/WebPlatform.ts @@ -54,8 +54,8 @@ export default class WebPlatform extends VectorBasePlatform { return; } - await registration.update(); navigator.serviceWorker.addEventListener("message", this.onServiceWorkerPostMessage.bind(this)); + await registration.update(); } private onServiceWorkerPostMessage(event: MessageEvent): void {