Move navigator message listener registration to be synchronously attached (#28340)

to silence Chrome warning

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/28384/head
Michael Telatynski 2024-11-05 11:04:14 +00:00 committed by GitHub
parent d7d96b6b8b
commit c9d9c421bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -54,8 +54,8 @@ export default class WebPlatform extends VectorBasePlatform {
return; return;
} }
await registration.update();
navigator.serviceWorker.addEventListener("message", this.onServiceWorkerPostMessage.bind(this)); navigator.serviceWorker.addEventListener("message", this.onServiceWorkerPostMessage.bind(this));
await registration.update();
} }
private onServiceWorkerPostMessage(event: MessageEvent): void { private onServiceWorkerPostMessage(event: MessageEvent): void {