blob: b41cf747964bf624b3c837167ba8629a4672ea1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!doctype html>
<style>
div { display: contents }
</style>
<div></div>
<div></div>
<script>
let divs = document.querySelectorAll('div');
divs[0].attachShadow({mode: 'open'}).innerHTML = `
<style>
* { color: green; }
</style>
<span>Should be green</span>
`;
divs[1].attachShadow({mode: 'open'}).innerHTML = `
<style>
* { color: initial; }
[foo] { }
</style>
<span>Should not be green</span>
`;
</script>
|