You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bughitsetPermissionRequestHandler handles permissions requests that can be responded to asynchronously (hence the callback). setPermissionCheckHandler handles permission checks that must be responded to synchronously.
I was logging both, just to understand them better in a page that wants audio and video and I was seeing media audio requests on both, PermissionRequestHandler and PermissionCheckHandler. Evidently requests for same perm type can be both sync and async. So if it's not the perm type, what differentiates async and sync requests?
@bughit It's where it comes from in Chromium. E.g. When a page calls xxx.requestPermission() it will fire a permission request. If they then do xxx.doTheThing() it may fire a synchronous permission check to validate.
@MarshallOfSound just to double check, would you then recommend using both methods for added security? this page and this page only call out setPermissionRequestHandler. Or is having both redundant?
Preflight Checklist
Issue Details
https://electronjs.org/docs/api/session#sessetpermissioncheckhandlerhandler
From the documented minor differences, it's not clear why both are needed and when one should use which.
@MarshallOfSound I found that you added setPermissionCheckHandler in #13925, could you please clarify?
The text was updated successfully, but these errors were encountered: