MCPcopy
hub / github.com/angular/angular / onPush

Method onPush

packages/service-worker/worker/src/driver.ts:331–339  ·  view source on GitHub ↗
(msg: PushEvent)

Source from the content-addressed store, hash-verified

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.

Callers 1

constructorMethod · 0.95

Calls 3

handlePushMethod · 0.95
waitUntilMethod · 0.80
jsonMethod · 0.80

Tested by

no test coverage detected