-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: make screen wrapper remote-friendly again #26620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of manually listing all APIs / keys of the screen
module, can we just implement the ownKeys
method of the ES6 proxy.
This restores accessibility of screen methods via remote.screen. Fixes electron#26610. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
3fbdbd5
to
8feaf0c
Compare
Only if it doesn’t need to be lazy when used via I had to also implement |
if (_screen === undefined) { | ||
_screen = createScreen(); | ||
} | ||
return prop in _screen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For completeness should this be Reflect.has
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s identical.
Release Notes Persisted
|
I have automatically backported this PR to "11-x-y", please check out #26660 |
I have automatically backported this PR to "12-x-y", please check out #26661 |
Description of Change
This restores accessibility of
screen
methods viaremote.screen
.Fixes #26610.
Cc @nornagon.
Checklist
npm test
passesRelease Notes
Notes: Fixed
screen
methods not being accessible viaremote.screen
.