summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-view-transitions/support/frame-helper.html
blob: 3d2e7b52d078d640602a15b97e54dd62981cb83d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!doctype html>

<style>
div {
  width: 100px;
  height: 100px;
  background: green;
}
html { height: 50%; }
::view-transition-group(*) { animation-duration: 500s }
</style>

<div></div>

<script>
function run() {
  document.startViewTransition(() => {
    requestAnimationFrame(() => requestAnimationFrame(() => {
      window.parent.postMessage({}, "*");
    }));
  });
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(run));
</script>