Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="reftest-wait">
<title>pausing animated image for a later-added background layer</title>
<meta charset="utf-8" />
<link rel="match" href="image-animation-background-paused-late-add-ref.html" />
<script src="/common/reftest-wait.js"></script>
<style>
#box {
width: 40px;
height: 10px;
background-image: url("../../images/anim-gr.gif");
background-repeat: no-repeat;
background-position: 0 0;
image-animation: paused;
}
</style>
<div id="box"></div>
<script>
window.addEventListener("load", () => {
requestAnimationFrame(() => {
const box = document.getElementById('box');
box.style.backgroundImage =
'url("../../images/anim-gr.gif"), url("../../images/anim-gr.gif")';
box.style.backgroundPosition = '0 0, 20px 0';
takeScreenshotDelayed(300);
});
});
</script>
</html>