Repository navigation
docs: document denying a display media request and fix a webview spec - #54587
Merged
Merged
Conversation
… checks The spec loaded another <webview id="webview"> on every pass of its loop, so from the second pass on `webview` named a collection of elements and the call was rejected with "webview.printToPDF is not a function". Only the first of the ten parameters was checked. Load the webview once, and require the rejection to name the parameter.
MarshallOfSound
approved these changes
Sep 30, 2026
nikwen
approved these changes
Sep 30, 2026
|
Release Notes Persisted
|
This was referenced Sep 30, 2026
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54588 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #54589 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Two small fixes, one commit each.
Calling the
ses.setDisplayMediaRequestHandlercallback withnulldenies the request, andgetDisplayMedia()in the page rejects with anAbortError. The docs typed the argument as a plain object, soelectron.d.tsrejectedcallback(null)understrict. This typesstreamsasObject | nulland says whatnulldoes. ThegetSourcessamples insession.mdanddesktop-capturer.mdalso never answered the request whengetSourcesrejects, for example when the user cancels the PipeWire picker on Linux, which leftgetDisplayMedia()pending. Both now callcallback(null).The
<webview>.printToPDF()spec for badly typed parameters loaded another webview with the same id on every pass of its loop, so from the second pass on the call was rejected with "webview.printToPDF is not a function" and only the first of the ten parameters reached the type check. It now loads the webview once and requires the rejection to name the parameter. With theheaderTemplatecheck removed, the old spec still passes and the new one fails.Checklist
Release Notes
Notes: Fixed the
setDisplayMediaRequestHandlercallback type to acceptnull.