Background Fetch APIservice
The BackgroundFetchEvent() constructor creates a new BackgroundFetchEvent object. This constructor is not typically used as the browser creates these objects itself and provides them to background fetch event callbacks.
Syntax
new BackgroundFetchEvent(type, options)
Parameters
type- : A string with the name of the event.
It is case-sensitive and browsers set it to
backgroundfetchabortorbackgroundfetchclick.
- : A string with the name of the event.
It is case-sensitive and browsers set it to
options- : An object that, in addition of the properties defined in ExtendableEvent/ExtendableEvent, has the following properties:
registration- : A BackgroundFetchRegistration object.
- : An object that, in addition of the properties defined in ExtendableEvent/ExtendableEvent, has the following properties:
Return value
A new BackgroundFetchEvent object.
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
