OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="resources/shadow-dom.js"></script> | 4 <script src="resources/shadow-dom.js"></script> |
5 <style> | |
6 * /deep/ div { | |
7 margin: 10px 10px 10px 10px; | |
8 border: solid black; | |
9 } | |
10 </style> | |
11 </head> | 5 </head> |
12 <body> | 6 <body> |
13 <script> | 7 <script> |
14 function text(contents) { | 8 function text(contents) { |
15 return document.createTextNode(contents); | 9 return document.createTextNode(contents); |
16 } | 10 } |
17 document.body.appendChild( | 11 document.body.appendChild( |
18 createDOM('div', {}, | 12 createDOM('div', {}, |
19 createShadowRoot({}, | 13 createShadowRoot({}, |
20 createDOM('div', {}, | 14 createDOM('div', {}, |
21 createShadowRoot({}, | 15 createShadowRoot({}, |
22 createDOM('content', {
'select': '#a-1'})), | 16 createDOM('content', {
'select': '#a-1'})), |
23 createDOM('content', {'select': '#a-1'}
))), | 17 createDOM('content', {'select': '#a-1'}
))), |
24 createDOM('div', {'id': 'a-1'}, text('a-1')))); | 18 createDOM('div', {'id': 'a-1'}, text('a-1')))); |
25 </script> | 19 </script> |
26 </body> | 20 </body> |
27 </html> | 21 </html> |
OLD | NEW |