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
feat: add WebFrameMain.visibilityState #28706
feat: add WebFrameMain.visibilityState #28706
Conversation
ea5d842
to
fde0e6d
Compare
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.
Looks like newly added test is failing on macOS: https://app.circleci.com/pipelines/github/electron/electron/38127/workflows/4af17c41-7d17-47c2-b050-a1c088106dec/jobs/840026
Thanks, I'll investigate. All of the Goma builds were failing previously. |
API LGTM |
I've added a delay in the test to fix the issue on macOS. ec9fe90 I'm not happy with this, but I don't think there's any other reliable way to test it without binding another event. Let me know whether this is okay. |
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.
Relying on a timeout will produce flaky results but we can use something like I've suggested here to effectively wait for the change.
8715960
to
271a5cc
Compare
API LGTM |
Release Notes Persisted
|
Description of Change
Adds
WebFrameMain.visibilityState
instance property which aligns withdocument.visibilityState
in the renderer.This can be useful for telling whether a frame is visible without needing to execute any JS in the renderer.
Checklist
npm test
passesRelease Notes
Notes: Added
WebFrameMain.visibilityState
instance property.