Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/cloud-messaging/receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ The file must import both the app and messaging SDKs, initialize Firebase and ex
Next, the worker must be registered. Within the `index.html` file, register the worker by modifying the `<script>` tag which bootstraps Flutter:

```html
<script src="flutter_bootstrap.js" async>
<script src="flutter_bootstrap.js" async></script>

<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('firebase-messaging-sw.js', {
Expand Down
Loading