Skip to content

ElectronWebContents.on('will-prevent-unload') method

ElectronWebContents › on(‘will-prevent-unload’)

Unofficial

Registers a listener for the will-prevent-unload event.

Signature:

on($event: "will-prevent-unload", listener: ($event: ElectronEvent) => void): this

Parameters:

ParameterTypeDescription
$event"will-prevent-unload"
listener($event: ElectronEvent) => voidCalled when the will-prevent-unload event is emitted.

Returns: this — This web contents instance.