Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
@keyframes fade {
from { opacity: 0.5; }
to { opacity: 0.5; }
}
</style>
<div id="host">host</div>
<script>
test(() => {
const host = document.getElementById("host");
const shadowRoot = host.attachShadow({ mode: "open" });
shadowRoot.innerHTML = `
<style>
:host {
animation-name: fade;
animation-duration: 1s;
animation-fill-mode: both;
}
@keyframes fade {
from { opacity: 0.25; }
to { opacity: 0.25; }
}
</style>
<slot></slot>
`;
println(`opacity: ${getComputedStyle(host).opacity}`);
});
</script>