Skip to content
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

fix(electron): consistently emit ready event after app is loaded #18972

Merged
merged 1 commit into from Nov 21, 2022

Conversation

pavelfeldman
Copy link
Member

@pavelfeldman pavelfeldman commented Nov 21, 2022

Fixes: #18928


(globalThis as any).__playwright_run = async () => {
// Wait for app to be ready to avoid browser initialization races.
await app.whenReady();
Copy link
Contributor

@andersk andersk Dec 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has caused a regression for apps using Electron APIs that need to be called before the ready event fires, such as protocol.registerSchemesAsPrivileged and app.disableHardwareAcceleration.

We need to give the user a chance to run synchronous code before the ready event fires for real—the Electron API is not fooled by our attempt to fake it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Electron firstWindow times out after upgrading to 1.28.0
3 participants