Skip to content

ElectronWebContents.on('will-navigate') method

ElectronWebContents › on(‘will-navigate’)

Unofficial

Registers a listener for the will-navigate event.

Signature:

on($event: "will-navigate", listener: ($event: ElectronEvent, url: string) => void): this

Parameters:

ParameterTypeDescription
$event"will-navigate"
listener($event: ElectronEvent, url: string) => voidCalled when the will-navigate event is emitted.

Returns: this — This web contents instance.