shouldYield - enabling script to yield to user input

Explainer here
<https://github.com/tdresser/should-yield/blob/master/README.md>, WICG
discourse thread here
<https://discourse.wicg.io/t/shouldyield-enabling-script-to-yield-to-user-input/2881>
.

Currently, developers need to trade off between completing work as fast as
possible and responding to user input as fast as possible. I propose adding
a window.shouldYield() API, which returns true if there's pending input (or
in some cases if the script is misbehaving).

Tim Dresser

Received on Friday, 3 August 2018 15:23:52 UTC