Truly independent web browser
<!DOCTYPE html>
<script src="../../include.js"></script>
<style>
#parent.before { color: red; }
#parent.after { color: green; }
</style>
<div id="parent" class="before">
<span id="read-child"></span>
<span id="sibling"></span>
</div>
<script>
test(() => {
const parent = document.getElementById("parent");
const readChild = document.getElementById("read-child");
const sibling = document.getElementById("sibling");
internals.updateStyle();
parent.className = "after";
const readChildColor = getComputedStyle(readChild).color;
internals.updateStyle();
const siblingColor = getComputedStyle(sibling).color;
println("read child color: " + readChildColor);
println("sibling color: " + siblingColor);
});
</script>