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

Can it be changed using networkidle0 or open options #101

Open
Dup4 opened this issue Apr 9, 2022 · 1 comment
Open

Can it be changed using networkidle0 or open options #101

Dup4 opened this issue Apr 9, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Dup4
Copy link

Dup4 commented Apr 9, 2022

When using networkidle2, I found that some things didn't load when loading the website, so I needed networkidle0 to fully load the website.

I found the corresponding code, but there is no option for me to change this.

capture-website/index.js

Lines 280 to 283 in f35f7f6

await page[isHTMLContent ? 'setContent' : 'goto'](input, {
timeout: timeoutInMilliseconds,
waitUntil: 'networkidle2',
});

So can we add an option to let the caller decide whether to use networkidle0 or networkidle2?

@sindresorhus
Copy link
Owner

I'm willing to have an option for this added in a form of a high-quality pull request. The option needs a good name. It should be a boolean and something more user-friendly than networkidle0. And docs, types, and tests.

@sindresorhus sindresorhus added enhancement New feature or request help wanted Extra attention is needed labels Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants