BackgroundFetchUpdateUIEvent.BackgroundFetchUpdateUIEvent()

The BackgroundFetchUpdateUIEvent() constructor creates a new BackgroundFetchUpdateUIEvent object. This constructor is not typically used as the browser creates these objects itself and provides them to background fetch event callbacks.

Syntax

let BackgroundFetchEvent = new BackgroundFetchEvent(type, BackgroundFetchEventInit);

Parameters

type
A string representing the name of the event. One of:
  • onbackgroundfetchsuccess
  • onbackgroundfetchfail
BackgroundFetchEventInit
An object including the following:
A BackgroundFetchRegistration.
The background fetch registration instance.
bubbles Optional
A Boolean indicating whether the event bubbles. The default is false.
cancelable Optional
A Boolean indicating whether the event can be cancelled. The default is false.
composed Optional
A Boolean indicating whether the event will trigger listeners outside of a shadow root (see Event.composed for more details). The default is false.

Specifications

Specification Status Comment
Background Fetch
The definition of 'BackgroundFetchUpdateUIEvent' in that specification.
Draft Initial definition.

Browser compatibility

BCD tables only load in the browser