Skip to content

docs: type webContents as nullable in app 'login' and 'select-client-certificate' - #53248

Merged
MarshallOfSound merged 1 commit into
44-x-yfrom
trop/44-x-y-bp-docs-type-webcontents-as-nullable-in-app-login-and-select-client-certificate--1787883423262
Aug 28, 2026
Merged

MarshallOfSound merged 1 commit into
44-x-yfrom
trop/44-x-y-bp-docs-type-webcontents-as-nullable-in-app-login-and-select-client-certificate--1787883423262

Conversation

@trop

@trop trop Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Backport of #53202

See that PR for details.

Notes: Fixed the TypeScript type of the webContents argument to app's login and select-client-certificate events, which is null for net and utility-process requests.

…certificate'

Both events are emitted with a null webContents for requests that don't
come from a renderer (net.fetch/net.request, utility processes), and the
prose says so, but the parameter was marked "(optional)", which the
definitions generator ignores for a non-trailing event argument. The
generated listener types therefore said `webContents: WebContents`.
Writing the type as `WebContents | null` makes electron.d.ts match.

No-Verification-Needed: docs-only change; verified by regenerating electron.d.ts.

Co-authored-by: Shelley Vohr <[email protected]>
@trop
trop Bot requested a review from codebytere August 28, 2026 02:17
@trop trop Bot added 44-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Aug 28, 2026
@MarshallOfSound
MarshallOfSound merged commit 7ad266e into 44-x-y Aug 28, 2026
61 checks passed
@release-clerk

release-clerk Bot commented Aug 28, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed the TypeScript type of the webContents argument to app's login and select-client-certificate events, which is null for net and utility-process requests.

@MarshallOfSound
MarshallOfSound deleted the trop/44-x-y-bp-docs-type-webcontents-as-nullable-in-app-login-and-select-client-certificate--1787883423262 branch August 28, 2026 05:15
@dsanders11 dsanders11 mentioned this pull request Aug 28, 2026
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

44-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant