OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src='resources/shadow-dom.js'></script> | |
3 <div id='host'> | |
4 <template data-mode='open'> | |
5 <style> | |
6 div { | |
7 background-color: green; | |
8 } | |
9 </style> | |
10 <div><slot></slot></div> | |
11 </template> | |
12 <div id='hostchild'>Hello</div> | |
13 </div> | |
14 <script> | |
15 hostchild.offsetTop; // Update layout before calling attachShadow() so that #ho stchild has a layout object | |
16 convertTemplatesToShadowRootsWithin(host); | |
17 </script> | |
OLD | NEW |