OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <template> |
| 4 <style>:host([green]) { color: green }</style> |
| 5 <content></content> |
| 6 </template> |
| 7 <div> |
| 8 <div></div> |
| 9 <div green>This text should be green</div> |
| 10 </div> |
| 11 <script> |
| 12 description("Don't share style between two hosts with different attribute matchi
ng for :host([])"); |
| 13 |
| 14 var template = document.querySelector("template"); |
| 15 |
| 16 var roots = document.querySelectorAll("div > div"); |
| 17 for (var i = 0; i < roots.length; i++) |
| 18 roots[i].createShadowRoot().appendChild(document.importNode(template.content
, true)); |
| 19 |
| 20 shouldBe("getComputedStyle(roots[1]).color", "'rgb(0, 128, 0)'"); |
| 21 </script> |
OLD | NEW |