OLD | NEW |
1 <script> | 1 <script> |
2 module.exports = function(callback) { | 2 import "dart:async"; |
3 window.requestAnimationFrame(function() { | 3 import "dart:sky"; |
4 // At this point, only the animate has happened, but no compositing | 4 |
5 // or layout. Use a timeout for the callback so that notifyDone | 5 void runAfterDisplay(void callback()) { |
6 // can be called inside of it. | 6 window.requestAnimationFrame((_) { |
7 // FIXME: we need a better way of waiting for chromium events to happen | 7 // At this point, only the animate has happened, but no compositing |
8 window.setTimeout(callback); | 8 // or layout. Use a timeout for the callback so that notifyDone |
9 }); | 9 // can be called inside of it. |
10 }; | 10 // FIXME: we need a better way of waiting for chromium events to happen |
| 11 new Timer(Duration.ZERO, callback); |
| 12 }); |
| 13 } |
11 </script> | 14 </script> |
OLD | NEW |