tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

animation-utils.js (422B)


      1 function waitForIterationChange(animation) {
      2  var initialIteration = animation.effect.getComputedTiming().currentIteration;
      3  return new Promise(resolve => {
      4    window.requestAnimationFrame(handleFrame = () => {
      5      if (animation.effect.getComputedTiming().currentIteration !=
      6            initialIteration) {
      7        resolve();
      8      } else {
      9        window.requestAnimationFrame(handleFrame);
     10      }
     11    });
     12  });
     13 }