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:

Parameter Type Description
event "will-attach-webview" The event name.
listener (event: ElectronEvent, webPreferences: WebPreferences, params: Record<string, string>) => void Called when the will-attach-webview event is emitted.

Returns: thisThis web contents instance.