TF-1246: Enable FCM for Web browser

This commit is contained in:
ManhNTX
2022-11-29 20:11:15 +07:00
committed by Dat H. Pham
parent d990426c8e
commit 045c7383e6
7 changed files with 45 additions and 5 deletions
+1
View File
@@ -56,6 +56,7 @@
// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
navigator.serviceWorker.register('firebase-messaging-sw.js');
var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;
navigator.serviceWorker.register(serviceWorkerUrl)
.then((reg) => {