gecko-dev/layout/reftests/webcomponents/style-sharing.html

15 строки
291 B
HTML

<!doctype html>
<div id="host"></div>
<script>
let root = host.attachShadow({mode: 'open'});
root.innerHTML = `
<style>
#test {
color: green;
}
</style>
<span id="test">Should be green</span>
<span id="test2">Should not be green</span>
`;
</script>