Skip to content

ElectronWebContents.on('focus') method

ElectronWebContents › on(‘focus’)

Unofficial

Registers a listener for the focus event.

Signature:

on(event: "focus", listener: (...args: unknown[]) => void): this

Parameters:

Parameter Type Description
event "focus" The event name.
listener (...args: unknown[]) => void Called when the focus event is emitted.

Returns: thisThis web contents instance.