Skip to content

Commit

Permalink
Demo update
Browse files Browse the repository at this point in the history
  • Loading branch information
LostBeard committed Jul 15, 2024
1 parent 6267ea1 commit 7760356
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BlazorServiceWorkerDemo/Services/PWAServiceWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ protected override async Task ServiceWorker_OnInstallAsync(ExtendableEvent e)
}

// optionally skip waiting and claim all clients

JS.Log(". ServiceWorker_OnInstallAsync", self);
await self!.SkipWaiting();
using var clients = self.Clients;
JS.Log(".. ServiceWorker_OnInstallAsync", clients);
await clients.Claim();
JS.Log("< ServiceWorker_OnInstallAsync");
}

protected override async Task ServiceWorker_OnActivateAsync(ExtendableEvent e)
Expand Down

0 comments on commit 7760356

Please sign in to comment.