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

chore: avoid unnecessary zero-delays in input code #4934

Merged
merged 1 commit into from Oct 21, 2019

Conversation

yury-s
Copy link
Contributor

@yury-s yury-s commented Sep 11, 2019

If delay is 0 we'll now skip the wait step.

@mathiasbynens
Copy link
Member

setTimeout(fn, 0) is clamped to ~4 ms, so there is a difference between “waiting for 0 ms” and “not waiting at all”. This would be an observable and potentially breaking change.

@yury-s
Copy link
Contributor Author

yury-s commented Oct 10, 2019

setTimeout(fn, 0) is clamped to ~4 ms, so there is a difference between “waiting for 0 ms” and “not waiting at all”. This would be an observable and potentially breaking change.

This delay is inside a method on client side (inside puppeteer). It'd be wrong to rely on any effects of it in the browser as it's not far from the length of transport delays in the protocol. At the same time current implementations of type() and press() with no delay will have slightly different behavior.

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