mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 00:23:00 +00:00
21 lines
735 B
HTML
21 lines
735 B
HTML
<!DOCTYPE html>
|
|
<div id="foo"></div>
|
|
<script src="../../include.js"></script>
|
|
<script>
|
|
promiseTest(async () => {
|
|
const foo = document.getElementById("foo");
|
|
const animation = foo.animate({}, { duration: 100 });
|
|
|
|
animation.play();
|
|
println(`Animation is pending after a call to play(): ${animation.pending}`);
|
|
|
|
await animation.ready;
|
|
println(`Animation is not pending after ready promise resolves: ${!animation.pending}`);
|
|
|
|
animation.pause();
|
|
println(`Animation is pending after a call to pause(): ${animation.pending}`);
|
|
|
|
await animation.ready;
|
|
println(`Animation is not pending after ready promise resolves: ${!animation.pending}`);
|
|
});
|
|
</script>
|