3 ms·
Why does a <script> tag not work in level 2? I can see it ending up in the DOM. Edit: Ah hah, HTML 5 spec explicitly says <script> tags inserted via innerHTML
by eridius 10y ago
Why does a <script> tag not work in level 2? I can see it ending up in the DOM.
Edit: Ah hah, HTML 5 spec explicitly says <script> tags inserted via innerHTML do not execute (https://www.w3.org/TR/2008/WD-html5-20080610/dom.html#innerhtml0 https://www.w3.org/TR/2008/WD-html5-20080610/dom.html#innerh...).
- cozuya 10y agoThat probably explains why its also stripped from React's not-so-accurately named "DangerouslySetInnerHTML" method..