feat(service-worker): handle 'notificationclick' events (#25860)

The previous version did not support the 'notificationclick' event.
Add event handler for the event and provide an observable of
clicked notifications in the SwPush service.

Closes #20956, #22311

PR Close #25860
This commit is contained in:
Joost Zoellner
2018-09-07 14:56:40 +02:00
committed by Kara Erickson
parent ea0a99610d
commit cf6ea283bb
8 changed files with 80 additions and 0 deletions

View File

@ -28,6 +28,7 @@ export class MockServiceWorkerContainer {
mockRegistration: MockServiceWorkerRegistration|null = null;
controller: MockServiceWorker|null = null;
messages = new Subject();
messagesClicked = new Subject();
addEventListener(event: 'controllerchange'|'message', handler: Function) {
if (event === 'controllerchange') {