flutter_flutter/tests/resources/run-after-display.sky
Adam Barth f2d2e80e59 Merge the Sky Engine changes from the SkyDart branch
This CL flips the switch to make Sky use Dart.

TBR=eseidel@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/922893002
2015-02-12 15:06:03 -08:00

15 lines
437 B
Plaintext

<script>
import "dart:async";
import "dart:sky";
void runAfterDisplay(void callback()) {
window.requestAnimationFrame((_) {
// At this point, only the animate has happened, but no compositing
// or layout. Use a timeout for the callback so that notifyDone
// can be called inside of it.
// FIXME: we need a better way of waiting for chromium events to happen
new Timer(Duration.ZERO, callback);
});
}
</script>