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

browser(firefox): support BrowserContext.evaluateOnNewDocument #1135

Merged
merged 1 commit into from Feb 26, 2020
Merged

browser(firefox): support BrowserContext.evaluateOnNewDocument #1135

merged 1 commit into from Feb 26, 2020

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Feb 26, 2020

@aslushnikov aslushnikov merged commit ee9c7f1 into microsoft:master Feb 26, 2020
@jperl
Copy link
Contributor

jperl commented Feb 27, 2020

This is great, now we do not have to poll for pages to inject our scripts. We could eliminate our page polling entirely if you created a similar API for exposeFunction:

await browserContext.exposeFunction('myFunction', (..args, page) => {
  // can use the page here
});

Or emit a "pagecreated" event from the BrowserContext that works for all pages, not just popups.

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.

None yet

3 participants