ElectronWebContents.on('will-prevent-unload') method
ElectronWebContents › on(‘will-prevent-unload’)
Unofficial
Registers a listener for thewill-prevent-unload event.Signature:
on($event: "will-prevent-unload", listener: ($event: ElectronEvent) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "will-prevent-unload" | |
| listener | ($event: ElectronEvent) => void | Called when the will-prevent-unload event is emitted. |
Returns: this — This web contents instance.