Skip to content

Commit

Permalink
Access Workbox from anywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky committed Mar 7, 2024
1 parent de78819 commit 54e580f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Twig/PwaRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private function injectServiceWorker(string $output, bool $injectSW, array $swAt
if ('serviceWorker' in navigator) {
const wb = new Workbox('{$url}'{$registerOptions});
wb.register();
window.workbox = wb;
}
</script>
SERVICE_WORKER;
Expand Down

0 comments on commit 54e580f

Please sign in to comment.