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

api(context): get rid of PageEvent #1433

Merged
merged 4 commits into from
Mar 19, 2020
Merged

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Mar 19, 2020

No description provided.

@yury-s yury-s marked this pull request as ready for review March 19, 2020 21:35
docs/api.md Outdated Show resolved Hide resolved
docs/api.md Show resolved Hide resolved
docs/api.md Show resolved Hide resolved
const opener = target.opener();
if (!opener)
return;
// Opener page must have been initialized already and resumed in order to
// create this popup, maybe use opener._crPage!.page()?
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, we can use _initializedPage.

Copy link
Member Author

@yury-s yury-s Mar 19, 2020

Choose a reason for hiding this comment

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

On the second thought I believe there is a slight chance of race: the opener page may have been fully initialized (and resumed) in the browser but playwright didn't receive all responses yet, child page may be created and initialized before the response comes. Leaving the code as is to allow for that.

test/browsercontext.spec.js Outdated Show resolved Hide resolved
test/popup.spec.js Outdated Show resolved Hide resolved
test/popup.spec.js Show resolved Hide resolved
test/popup.spec.js Show resolved Hide resolved
test/popup.spec.js Show resolved Hide resolved
test/popup.spec.js Show resolved Hide resolved
@yury-s yury-s merged commit 535b484 into microsoft:master Mar 19, 2020
@yury-s yury-s deleted the page-event branch March 19, 2020 23:25
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.

2 participants