summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-animations/in-visibility-hidden-animation.html
blob: 7488344e0e70f2cfe9db0f53fc1e2015c01e4473 (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
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE HTML>
<html class="reftest-wait">
<title>in visibility hidden color animation</title>
<style>

@keyframes color {
  0% { color: black }
  1% { color: blue }
  100% { color: blue }
}

p {
  visibility: visible;
}

div {
  color: black;
  animation: color 0.1s 1 forwards;
  visibility: hidden;
}

</style>
<div id="parent"><p>color animation on visible element in invisible parent element</p></div>
<script>

document.getElementById("parent").addEventListener("animationend", AnimationEndListener);

function AnimationEndListener(event) {
  setTimeout(RemoveReftestWait, 0);
}

function RemoveReftestWait() {
  document.documentElement.classList.remove("reftest-wait");
}

</script>