InstallEvent: InstallEvent() constructor
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("Service Workers API")}}
The **InstallEvent()** constructor creates a new {{domxref("InstallEvent")}} object.
Syntax
js-nolint
new InstallEvent(type, options)Parameters
type- : A string with the name of the event.
It is case-sensitive and browsers always set it to install.
options{{optional_inline}}- : An object that, _in addition of the properties defined in {{domxref("Event/Event", "Event()")}}_, can contain any custom settings that you want to apply to the event object. Currently no possible options are mandatory, but this has been defined for forward compatibility.
Return value
A new {{domxref("InstallEvent")}} object.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{jsxref("Promise")}}
- Fetch API