OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 | 3 |
4 | 4 |
5 <p>This test ensures that content element can select elements assigned to a shad
ow element.</p> | 5 <p>This test ensures that content element can select elements assigned to a shad
ow element.</p> |
6 | 6 |
7 <div id="host1"> | 7 <div id="host1"> |
8 <div class="A">A</div> | 8 <div class="A">A</div> |
9 <div class="A">A</div> | 9 <div class="A">A</div> |
10 <div class="B">B</div> | 10 <div class="B">B</div> |
11 <div class="B">B</div> | 11 <div class="B">B</div> |
12 </div> | 12 </div> |
13 | 13 |
14 <script> | 14 <script> |
15 var shadowRoot1 = host1.createShadowRoot(); | 15 var shadowRoot1 = host1.createShadowRoot(); |
16 shadowRoot1.innerHTML = '<div id="host2"><content select=".A"></content><shadow>
<content></content></shadow><div class="A">A</div></div>'; | 16 shadowRoot1.innerHTML = '<div id="host2"><content select=".A"></content><shadow>
</shadow><div class="A">A</div></div>'; |
17 | 17 |
18 var shadowRoot2 = shadowRoot1.getElementById('host2').createShadowRoot(); | 18 var shadowRoot2 = shadowRoot1.getElementById('host2').createShadowRoot(); |
19 shadowRoot2.innerHTML = '<div><h2>A</h2><content select=".A"></content><h2>B</h2
><shadow><content></content></shadow></div>' | 19 shadowRoot2.innerHTML = '<div><h2>A</h2><content select=".A"></content><h2>B</h2
><shadow></shadow></div>' |
20 </script> | 20 </script> |
21 | 21 |
22 </html> | 22 </html> |
OLD | NEW |