-
Notifications
You must be signed in to change notification settings - Fork 16.9k
feat: ready-to-show event on webContents
#49315
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
base: main
Are you sure you want to change the base?
feat: ready-to-show event on webContents
#49315
Conversation
|
💖 Thanks for opening this pull request! 💖 Semantic PR titlesWe use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Commit signingThis repo enforces commit signatures for all incoming PRs. PR tipsThings that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
nikwen
left a comment
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.
Thanks for working on this!
I'll let someone else look at the C++ code who is more familiar with it.
spec/api-web-contents-view-spec.ts
Outdated
| const w = new BaseWindow({ show: true }); | ||
| w.setContentView(v2); | ||
| const state2 = await v2.webContents.executeJavaScript('document.visibilityState'); | ||
| expect(state2).to.equal('visible'); |
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.
Two separate tests should be two separate it() calls.
ready-to-show event on webContents
Description of Change
Fixes #43531
Feat: add paintWhenInitiallyHidden option to WebContentsView
This PR adds a
paintWhenInitiallyHiddenoption to theWebContentsViewconstructor.Setting this flag to
true( which is default ) "wakes up" the renderer so it can fireready-to-showand correctly set its initial visibilityState to hidden while still in the background.Checklist
npm testpassesRelease Notes
Notes: Added the
paintWhenInitiallyHiddenoption to theWebContentsViewconstructor to allow background painting and initialization.