Skip to content

ElectronWebContents.on('will-attach-webview') method

ElectronWebContents › on(‘will-attach-webview’)

Unofficial

Registers a listener for the will-attach-webview event.

Signature:

on($event: "will-attach-webview", listener: ($event: ElectronEvent, webPreferences: WebPreferences, params: Record<string, string>) => void): this

Parameters:

ParameterTypeDescription
$event"will-attach-webview"
listener($event: ElectronEvent, webPreferences: WebPreferences, params: Record<string, string>) => voidCalled when the will-attach-webview event is emitted.

Returns: this — This web contents instance.