MarshallOfSound

#53170: docs: document every permission type passed to the session permission handlers

Merged
Created: Aug 25, 2026, 2:26:52 AM
Merged: Aug 26, 2026, 1:32:11 PM
3 comments
Target: main

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 permission parameter 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

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

44-x-y
Merged
PR Number
#53212
Merged At
Aug 26, 2026, 1:54:14 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

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