Skip to content

ElectronProtocol.registerStreamProtocol method

ElectronProtocol › registerStreamProtocol

Unofficial

Registers a protocol of scheme that will send a stream as a response.

Signature:

registerStreamProtocol(scheme: string, handler: (request: ElectronProtocolRequest, callback: (response: any) => void) => void): boolean

Parameters:

ParameterTypeDescription
schemestringThe scheme to register.
handler(request: ElectronProtocolRequest, callback: (response: any) => void) => voidCalled with the request and a callback to send the response.

Returns: booleanWhether the protocol was successfully registered.