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 value indicating whether the event bubbles. The default is false.

cancelable Optional

A boolean value indicating whether the event can be cancelled. The default is false.

composed Optional

A boolean value indicating whether the event will trigger listeners outside of a shadow root (see Event.composed for more details). The default is false.

Specifications

Specification
Background Fetch
# dom-backgroundfetchupdateuievent-backgroundfetchupdateuievent

Browser compatibility

BCD tables only load in the browser