From 13749797ecbd1845230424d2e64664b4619d5255 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Tue, 7 Nov 2017 21:39:59 -0800 Subject: [PATCH] :memo: Document setPermissionRequestHandler(null) --- docs/api/session.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api/session.md b/docs/api/session.md index 25ca1b3a8242..64cb7caf4fa1 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -287,7 +287,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => { #### `ses.setPermissionRequestHandler(handler)` -* `handler` Function +* `handler` Function | null * `webContents` [WebContents](web-contents.md) - WebContents requesting the permission. * `permission` String - Enum of 'media', 'geolocation', 'notifications', 'midiSysex', 'pointerLock', 'fullscreen', 'openExternal'. @@ -296,6 +296,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => { Sets the handler which can be used to respond to permission requests for the `session`. Calling `callback(true)` will allow the permission and `callback(false)` will reject it. +To clear the handler, call `setPermissionRequestHandler(null)`. ```javascript const {session} = require('electron')