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:

ParameterTypeDescription
event"activate"The event name.
listener(event: ElectronEvent, hasVisibleWindows: boolean) => voidThe event handler.

Returns: thisThis ElectronApp instance.