sindresorhus / capture-website

Capture screenshots of websites
MIT License
1.93k stars 137 forks source link

Can it be changed using networkidle0 or open options #101

Open Dup4 opened 2 years ago

Dup4 commented 2 years ago

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.

https://github.com/sindresorhus/capture-website/blob/f35f7f6503aef33edb17a00c77cd7ec10f337381/index.js#L280-L283

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

sindresorhus commented 2 years ago

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.