gecko-dev/layout/reftests/webcomponents/style-sharing-across-shadow...

23 строки
437 B
HTML
Исходник Обычный вид История

<!doctype html>
<style>
div { display: contents }
</style>
<div></div>
<div></div>
<script>
let divs = document.querySelectorAll('div');
divs[0].createShadowRoot().innerHTML = `
<style>
* { color: green; }
</style>
<span>Should be green</span>
`;
divs[1].createShadowRoot().innerHTML = `
<style>
* { color: initial; }
[foo] { }
</style>
<span>Should not be green</span>
`;
</script>