AsyncHelper
A helper class to make asynchronous tasks await friendly.
No results
Functions
Functions are methods available for calling on the class-
Returns a promise that resolves on next animation frame.
async method() { // do work await AsyncHelper.animationFrame(); // do more work } -
Returns a promise that resolves as soon as possible, allowing the browser to minimally process other messages. This is the shortest possible delay the browser offers, so be aware that it does not necessarily allow the browser to paint or reflow if used in a long loop. It does, however, allow other async methods to execute.
async method() { await AsyncHelper.yield(); // ... }