4 ms·
Puppeteer's Networkidle events are the easiest solution, and I've had no problems with networkidle0 (waits until there's 0 pending requests). For a foolproof w
by gitgud 6y ago
Puppeteer's Networkidle events are the easiest solution, and I've had no problems with networkidle0 (waits until there's 0 pending requests).
For a foolproof way, you could also just wait until the specific DOM node you want exists. Either by:
- Polling the DOM until it exists via; setTimeout/setInterval
- Using MutationObservers to check the DOM on every node change, until it's been added to the DOM