(msg: PushEvent)
| 329 | } |
| 330 | |
| 331 | private onPush(msg: PushEvent): void { |
| 332 | // Push notifications without data have no effect. |
| 333 | if (!msg.data) { |
| 334 | return; |
| 335 | } |
| 336 | |
| 337 | // Handle the push and keep the SW alive until it's handled. |
| 338 | msg.waitUntil(this.handlePush(msg.data.json())); |
| 339 | } |
| 340 | |
| 341 | private onClick(event: NotificationEvent): void { |
| 342 | // Handle the click event and keep the SW alive until it's handled. |
no test coverage detected