blob: 63dba7c79e31f1b09e9593163776322a15e4b996 [file] [log] [blame] [edit]
<body>
This test passes if it doesn't crash.
<host-element id=host>
<template shadowrootmode=open></template>
</host-element>
<script>
window.testRunner?.dumpAsText();
const css = new CSSStyleSheet();
css.replaceSync("* { :has(.foo) { color: green; } }");
document.adoptedStyleSheets.push(css);
host.shadowRoot.adoptedStyleSheets.push(css);
document.body.offsetWidth;
const div = document.createElement("div");
div.classList.add("foo");
document.body.appendChild(div);
</script>