javascript - using shadow dom in Internet Explorer -
the below code works in chrome not in internet explorer. there way use 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>
internet explorer (and new edge browser) doesn't support shadow dom natively. can use polyfill achieve desired behaviour.
Comments
Post a Comment