feat: correctly identify permissions when using setPermissionRequestHandler (#26172)

* fix: correctly identify clipboard read permission

* Update tests for variable clipboard content

* chore: add all possible permission conversions

* VIDEO_CAPTURE and AUDIO_CAPTURE were already defined

* Handle all PermissionTypes

* use skewer case for accessibility events to match permissions api

https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API
This commit is contained in:
John Kleinschmidt 2020-10-29 14:22:32 -04:00 committed by GitHub
parent 07ee75b745
commit 7f9b21daa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 97 additions and 1 deletions

View file

@ -487,6 +487,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
* `handler` Function | null
* `webContents` [WebContents](web-contents.md) - WebContents requesting the permission. Please note that if the request comes from a subframe you should use `requestingUrl` to check the request origin.
* `permission` String - The type of requested permission.
* `clipboard-read` - Request access to read from the clipboard.
* `media` - Request access to media devices such as camera, microphone and speakers.
* `mediaKeySystem` - Request access to DRM protected content.
* `geolocation` - Request access to user's current location.