Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<script src="../work-test.js"></script>
<div style="display: flex"><span id="target"></span></div>
<script>
test(() => {
const target = document.getElementById("target");
const animation = target.animate(
{ opacity: [0, 1] },
{ duration: 1000, fill: "both" });
animation.pause();
animation.currentTime = 100;
target.offsetWidth;
const work = layoutWork(() => {
for (const time of [200, 300, 400]) {
animation.currentTime = time;
target.offsetWidth;
}
});
println(`layout while seeking the animation: ${work.passes().join(" | ") || "(no layout)"}`);
});
</script>