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
feat(page): emulate idle state #6410
feat(page): emulate idle state #6410
Conversation
* https://bugs.chromium.org/p/chromium/issues/detail?id=1090802 * added `page.setIdleOverride(...)`; * added `page.clearIdleOverride()`; * added tests; * added launch argument `--enable-blink-features=IdleDetection` to turn IdleDetection on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation LGTM. I left some comments mostly wanting to discuss the Puppeteer-level API. There is no need to match the CDP API directly — we should try to provide the most user-friendly API possible (which in most cases is somewhat different from the CDP one).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % some final requests
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
page.emulateIdleState(...)
allowing emulate or remove emulation of the idle state;emulate idle
->remove emulation
->emulate idle
->remove emulation
;--enable-blink-features=IdleDetection
to turn IdleDetection on.