Session.setPermissionCheckHandler method
Session › setPermissionCheckHandler
Unofficial
Sets the handler used to respond to permission checks for the session.Signature:
setPermissionCheckHandler(handler: ((webContents: ElectronWebContents | null, permission: string, requestingOrigin: string, details: ElectronPermissionCheckHandlerHandlerDetails) => boolean) | null): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| handler | ((webContents: ElectronWebContents | null, permission: string, requestingOrigin: string, details: ElectronPermissionCheckHandlerHandlerDetails) => boolean) | null | The handler returning whether the permission is allowed, or null to clear it. |
Returns: void