OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 #host { | 5 #host { |
6 width: 200px; | 6 width: 200px; |
7 } | 7 } |
8 </style> | 8 </style> |
9 </head> | 9 </head> |
10 <body> | 10 <body> |
11 <div id="host" tabindex=0> | 11 <div id="host" tabindex=0> |
12 <div> | 12 <div> |
13 <div><div>First line leads,</div></div> | 13 <div><div>First line leads,</div></div> |
14 </div> | 14 </div> |
15 </div> | 15 </div> |
16 <script> | 16 <script> |
17 if (window.internals) | 17 if (window.internals) |
18 internals.settings.setAuthorShadowDOMForAnyElementEnabled(true); | 18 internals.settings.setAuthorShadowDOMForAnyElementEnabled(true); |
19 | 19 |
20 var host = document.getElementById("host"); | 20 var host = document.getElementById("host"); |
21 var shadow1 = host.createShadowRoot(); | 21 var shadow1 = host.createShadowRoot(); |
22 shadow1.innerHTML = "<div><shadow><content></content></shadow><div></div></div>"
; | 22 shadow1.innerHTML = "<div><shadow></shadow><div></div></div>"; |
23 var shadow2 = host.createShadowRoot(); | 23 var shadow2 = host.createShadowRoot(); |
24 shadow2.innerHTML = "<section>" | 24 shadow2.innerHTML = "<section>" |
25 + "<shadow><content></content></shadow>" | 25 + "<shadow></shadow>" |
26 + "<div>second line follows.</div>" | 26 + "<div>second line follows.</div>" |
27 + "</section>"; | 27 + "</section>"; |
28 host.focus(); | 28 host.focus(); |
29 host.blur(); | 29 host.blur(); |
30 </script> | 30 </script> |
31 </body> | 31 </body> |
32 </html> | 32 </html> |
OLD | NEW |