fix: make screen wrapper remote-friendly again (#26620)
This restores accessibility of screen methods via remote.screen. Fixes #26610. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
6932e02eb8
commit
b1b25607ee
1 changed files with 18 additions and 0 deletions
|
@ -16,5 +16,23 @@ export default new Proxy({}, {
|
|||
return v.bind(_screen);
|
||||
}
|
||||
return v;
|
||||
},
|
||||
ownKeys: () => {
|
||||
if (_screen === undefined) {
|
||||
_screen = createScreen();
|
||||
}
|
||||
return Reflect.ownKeys(_screen);
|
||||
},
|
||||
has: (target, prop: string) => {
|
||||
if (_screen === undefined) {
|
||||
_screen = createScreen();
|
||||
}
|
||||
return prop in _screen;
|
||||
},
|
||||
getOwnPropertyDescriptor: (target, prop: string) => {
|
||||
if (_screen === undefined) {
|
||||
_screen = createScreen();
|
||||
}
|
||||
return Reflect.getOwnPropertyDescriptor(_screen, prop);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue