diff options
Diffstat (limited to 'devtools/client/inspector/animation/test/doc_custom_playback_rate.html')
-rw-r--r-- | devtools/client/inspector/animation/test/doc_custom_playback_rate.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/devtools/client/inspector/animation/test/doc_custom_playback_rate.html b/devtools/client/inspector/animation/test/doc_custom_playback_rate.html new file mode 100644 index 0000000000..9adee99884 --- /dev/null +++ b/devtools/client/inspector/animation/test/doc_custom_playback_rate.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8"> + <style> + div { + background-color: lime; + height: 100px; + } + </style> + </head> + <body> + <script> + "use strict"; + + const duration = 100000; + + function createAnimation(cls) { + const div = document.createElement("div"); + div.classList.add(cls); + document.body.appendChild(div); + const animation = div.animate([{ opacity: 0 }], duration); + animation.playbackRate = 1.5; + } + + createAnimation("div1"); + createAnimation("div2"); + </script> + </body> +</html> |