|
@@ -822,18 +822,19 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
|
|
* `permission` string - The type of requested permission.
|
|
|
* `clipboard-read` - Request access to read from the clipboard.
|
|
|
* `clipboard-sanitized-write` - Request access to write to the clipboard.
|
|
|
+ * `display-capture` - Request access to capture the screen via the [Screen Capture API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API).
|
|
|
+ * `fullscreen` - Request control of the app's fullscreen state via the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
|
|
+ * `geolocation` - Request access to the user's location via the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)
|
|
|
+ * `idle-detection` - Request access to the user's idle state via the [IdleDetector API](https://developer.mozilla.org/en-US/docs/Web/API/IdleDetector).
|
|
|
* `media` - Request access to media devices such as camera, microphone and speakers.
|
|
|
- * `display-capture` - Request access to capture the screen.
|
|
|
* `mediaKeySystem` - Request access to DRM protected content.
|
|
|
- * `geolocation` - Request access to user's current location.
|
|
|
- * `notifications` - Request notification creation and the ability to display them in the user's system tray.
|
|
|
- * `midi` - Request MIDI access in the `webmidi` API.
|
|
|
- * `midiSysex` - Request the use of system exclusive messages in the `webmidi` API.
|
|
|
- * `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more. These requests always appear to originate from the main frame.
|
|
|
- * `fullscreen` - Request for the app to enter fullscreen mode.
|
|
|
+ * `midi` - Request MIDI access in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
|
|
+ * `midiSysex` - Request the use of system exclusive messages in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
|
|
+ * `notifications` - Request notification creation and the ability to display them in the user's system tray using the [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/notification)
|
|
|
+ * `pointerLock` - Request to directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
|
|
|
* `openExternal` - Request to open links in external applications.
|
|
|
* `window-management` - Request access to enumerate screens using the [`getScreenDetails`](https://developer.chrome.com/en/articles/multi-screen-window-placement/) API.
|
|
|
- * `unknown` - An unrecognized permission request
|
|
|
+ * `unknown` - An unrecognized permission request.
|
|
|
* `callback` Function
|
|
|
* `permissionGranted` boolean - Allow or deny the permission.
|
|
|
* `details` Object - Some properties are only available on certain permission types.
|
|
@@ -865,7 +866,22 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
|
|
|
|
|
* `handler` Function\<boolean> | null
|
|
|
* `webContents` ([WebContents](web-contents.md) | null) - WebContents checking the permission. Please note that if the request comes from a subframe you should use `requestingUrl` to check the request origin. All cross origin sub frames making permission checks will pass a `null` webContents to this handler, while certain other permission checks such as `notifications` checks will always pass `null`. You should use `embeddingOrigin` and `requestingOrigin` to determine what origin the owning frame and the requesting frame are on respectively.
|
|
|
- * `permission` string - Type of permission check. Valid values are `midiSysex`, `notifications`, `geolocation`, `media`,`mediaKeySystem`,`midi`, `pointerLock`, `fullscreen`, `openExternal`, `hid`, `serial`, or `usb`.
|
|
|
+ * `permission` string - Type of permission check.
|
|
|
+ * `clipboard-read` - Request access to read from the clipboard.
|
|
|
+ * `clipboard-sanitized-write` - Request access to write to the clipboard.
|
|
|
+ * `geolocation` - Access the user's geolocation data via the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)
|
|
|
+ * `fullscreen` - Control of the app's fullscreen state via the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
|
|
+ * `hid` - Access the HID protocol to manipulate HID devices via the [WebHID API](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API).
|
|
|
+ * `idle-detection` - Access the user's idle state via the [IdleDetector API](https://developer.mozilla.org/en-US/docs/Web/API/IdleDetector).
|
|
|
+ * `media` - Access to media devices such as camera, microphone and speakers.
|
|
|
+ * `mediaKeySystem` - Access to DRM protected content.
|
|
|
+ * `midi` - Enable MIDI access in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
|
|
+ * `midiSysex` - Use system exclusive messages in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
|
|
+ * `notifications` - Configure and display desktop notifications to the user with the [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/notification).
|
|
|
+ * `openExternal` - Open links in external applications.
|
|
|
+ * `pointerLock` - Directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
|
|
|
+ * `serial` - Read from and write to serial devices with the [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API).
|
|
|
+ * `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
|
|
|
* `requestingOrigin` string - The origin URL of the permission check
|
|
|
* `details` Object - Some properties are only available on certain permission types.
|
|
|
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
|