Truly independent web browser
<!DOCTYPE html>
<script src="../../include.js"></script>
<style>
.item { color: red; background-color: white; transition: color 1s; }
.changed { color: blue; }
</style>
<div id="host"></div>
<script>
test(() => {
const host = document.getElementById("host");
for (let index = 0; index < 12; ++index) {
const item = document.createElement("div");
item.className = "item";
host.appendChild(item);
internals.updateStyle();
}
internals.updateStyle();
for (const item of host.children) {
item.classList.add("changed");
internals.updateStyle();
}
for (const animation of document.getAnimations())
animation.finish();
internals.updateStyle();
println(`color: ${getComputedStyle(host.lastElementChild).color}`);
});
</script>