#53170: docs: document every permission type passed to the session permission handlers
Description of Change
ses.setPermissionRequestHandler() and ses.setPermissionCheckHandler() receive every blink::PermissionType that Chromium asks about — ElectronPermissionManager::RequestPermissionsWithDetails and CheckPermissionWithDetails pass each type straight to the JS handler without filtering. The docs (and therefore the generated TypeScript union for permission) only listed 20 of the 46 strings that Converter<blink::PermissionType>::ToV8 can emit, so handlers could receive values such as screen-wake-lock, sensors, persistent-storage or local-network-access that were undocumented and rejected by the type checker.
- Lists all 46 permission strings for both handlers, alphabetically, with a one-line description and a spec/MDN link where one exists.
- Notes on each
permissionparameter that the list mirrors Chromium's permission types, so entries that are platform- or feature-specific are expected. - Existing descriptions are unchanged; only the ordering and two stray double spaces were touched.
Verified the documented set equals the converter's string set (46/46, no extras), and that the regenerated electron.d.ts union has 46 members for both handlers.
Fixes #30000
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Documented every permission type that can be passed to ses.setPermissionRequestHandler() and ses.setPermissionCheckHandler(), and added them to the TypeScript definitions.
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron