Open coryhouse opened 5 years ago
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>Hello World from the Light DOM</h1>
<div id="shadow-host"></div>
<script>
var host = document.getElementById('shadow-host');
var root = host.attachShadow({mode: 'open'});
root.innerHTML = "<h1>Hello World from Shadow DOM!</h1>";
</script>
</body>
</html>
https://developer.mozilla.org/en-US/docs/Web/API/Element/createShadowRoot