ElectronProtocol.registerStringProtocol method
ElectronProtocol › registerStringProtocol
Unofficial
Registers a protocol ofscheme that will send a string as a response. Signature:
registerStringProtocol(scheme: string, handler: (request: ElectronProtocolRequest, callback: (response: string | ElectronProtocolResponse) => void) => void): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
| scheme | string | The scheme to register. |
| handler | (request: ElectronProtocolRequest, callback: (response: string | ElectronProtocolResponse) => void) => void | Called with the request and a callback to send the response. |
Returns: boolean — Whether the protocol was successfully registered.