Skip to content

ElectronApp.setAsDefaultProtocolClient method

ElectronApp › setAsDefaultProtocolClient

Unofficial

Sets the current executable as the default handler for a protocol.

Signature:

setAsDefaultProtocolClient(protocol: string, path?: string | undefined, args?: string[] | undefined): boolean

Parameters:

Parameter Type Description
protocol string The protocol name, without the ://.
path? string | undefined The executable path.
args? string[] | undefined The arguments.

Returns: booleanWhether the call succeeded.