Reputation: 21
The below code works in chrome but not in Internet Explorer. Is there any way to use it in Internet Explorer?
<html>
<head></head>
<body>
<div>
<h4>My Content Heading</h4>
<p>My content text</p>
</div>
<script>
var myContent = document.querySelector('div');
var shadowroot = myContent.createShadowRoot();
shadowroot.innerHTML =
'<h2>Inserted Heading</h2> <content select="p"></content>';
</script>
</body>
</html>
Upvotes: 2
Views: 8571