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:

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

Returns: booleanWhether the call succeeded.