| 1 |
<html> |
| 2 |
<body> |
| 3 |
<div id="container"></div> |
| 4 |
</body> |
| 5 |
<script> |
| 6 |
const s = document.querySelector('div').attachShadow({ mode: 'closed' }) |
| 7 |
const p = document.createElement('p') |
| 8 |
p.innerText = 'inside' |
| 9 |
s.appendChild(p) |
| 10 |
</script> |
| 11 |
</html> |