blob: bd7d32d98c251daabc5c481effdf3ca93ab321cd [file] [log] [blame]
<div id=host></div>
<script>
const shadow = host.attachShadow({ mode: "open" });
shadow.innerHTML = `<style></style><div>This should be green</div>`;
const style = shadow.querySelector("style");
style.sheet.addRule("div", "color: red");
host.offsetWidth;
style.sheet.addRule("div", "color: green");
</script>