doc_markup_anonymous.html (690B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Anonymous content test</title> 6 <style type="text/css"> 7 #pseudo::before { 8 content: "before"; 9 } 10 #pseudo::after { 11 content: "after"; 12 } 13 #shadow::before { 14 content: "Testing ::before on a shadow host"; 15 } 16 </style> 17 </head> 18 <body> 19 <div id="pseudo"><span>middle</span></div> 20 21 <div id="shadow">light dom</div> 22 23 <div id="native"><input type="file"></div> 24 25 <script> 26 "use strict"; 27 var host = document.querySelector("#shadow"); 28 var root = host.attachShadow({ mode: "open" }); 29 root.innerHTML = "<h3>Shadow DOM</h3><select multiple></select>"; 30 </script> 31 </body> 32 </html>