BackgroundFetchEvent: registration property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Note: This feature is only available inService Workers.
Theregistration read-only property of theBackgroundFetchEvent interface returns aBackgroundFetchRegistration object.
In this article
Value
Examples
In this example, if the user clicks on the user interface displaying the download progress, this fires thebackgroundfetchclick event. The currentBackgroundFetchRegistration is returned by callingevent.registration.
js
addEventListener("backgroundfetchclick", (event) => { console.log(event.registration);});Specifications
| Specification |
|---|
| Background Fetch> # dom-backgroundfetchevent-registration> |