tor-browser

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

run-after-layout-and-paint.js (423B)


      1 // This is inspired in runAfterLayoutAndPaint() from
      2 // third_party/blink/web_tests/resources/run-after-layout-and-paint.js.
      3 function runAfterLayoutAndPaint(callback) {
      4  // See http://crrev.com/c/1395193/10/third_party/blink/web_tests/http/tests/resources/run-after-layout-and-paint.js
      5  // for more discussions.
      6  requestAnimationFrame(function() {
      7    requestAnimationFrame(function() {
      8      callback();
      9    });
     10  });
     11 }