Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
#target {
width: 100px;
height: 50px;
background-image: url("../wpt-import/images/anim-gr.gif");
}
</style>
<div id="target"></div>
<script>
const imageURL = "../wpt-import/images/anim-gr.gif";
promiseTest(async () => {
await new Promise(resolve => window.addEventListener("load", resolve));
internals.dumpLayoutTree(document);
println(`timer active before replacement: ${internals.imageAnimationStateForURL(imageURL).isAnimating}`);
target.style.display = "inline";
internals.dumpLayoutTree(document);
println(`timer active after replacement: ${internals.imageAnimationStateForURL(imageURL).isAnimating}`);
target.style.display = "none";
internals.dumpLayoutTree(document);
println(`timer active after hiding: ${internals.imageAnimationStateForURL(imageURL).isAnimating}`);
});
</script>