ElectronProtocol.interceptStreamProtocol method
ElectronProtocol › interceptStreamProtocol
Unofficial
Same asregisterStreamProtocol, except that it replaces an existing protocol handler. Signature:
interceptStreamProtocol(scheme: string, handler: (request: ElectronProtocolRequest, callback: (response: any) => void) => void): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
| scheme | string | The scheme to intercept. |
| handler | (request: ElectronProtocolRequest, callback: (response: any) => void) => void | Called with the request and a callback to send the response. |
Returns: boolean — Whether the protocol was successfully intercepted.