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, args?: string[]): boolean

Parameters:

ParameterTypeDescription
protocolstringThe protocol name, without the ://.
path?stringThe executable path.
args?string[]The arguments.

Returns: boolean — Whether the call succeeded.