Skip to content

ElectronApp.on('activate') method

ElectronApp › on(‘activate’)

Unofficial

Registers a listener for the activate event.

Emitted when the application is activated. macOS only.

Signature:

on(event: "activate", listener: (event: ElectronEvent, hasVisibleWindows: boolean) => void): this

Parameters:

Parameter Type Description
event "activate" The event name.
listener (event: ElectronEvent, hasVisibleWindows: boolean) => void The event handler.

Returns: thisThis ElectronApp instance.