htmlpreview / htmlpreview.github.com

HTML Preview for GitHub Repositories
htmlpreview.github.com
1.51k stars 303 forks source link

Preview a html with javascript type set on module. #117

Open nodi-andy opened 1 year ago

nodi-andy commented 1 year ago

I have following line in my html: <script type = "module" src = "./src/main.js"></script>

the lines: var loadJS = function (data) { if (data) { var script = document.createElement('script'); script.innerHTML = data; document.body.appendChild(script); } };

import my main.js without the type set on module. Why the type of script is ignored?