Skip to content

ElectronApp.on('open-url') method

ElectronApp › on(‘open-url’)

Unofficial

Registers a listener for the open-url event.

Emitted when the user wants to open a URL with the application. macOS only.

Signature:

on(event: "open-url", listener: (event: ElectronEvent, url: string) => void): this

Parameters:

ParameterTypeDescription
event"open-url"The event name.
listener(event: ElectronEvent, url: string) => voidThe event handler.

Returns: thisThis ElectronApp instance.