ElectronWebContents.on('focus') method
ElectronWebContents › on(‘focus’)
Unofficial
Registers a listener for thefocus event. Signature:
on(event: "focus", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "focus" | The event name. |
| listener | (...args: unknown[]) => void | Called when the focus event is emitted. |
Returns: this — This web contents instance.