Is there any way to replace the script type with javascript only and execute it
this is an example script
<script id="myscript" src='myscript.js' type='text/template'></script>
i want to replace type with text/javascript i tried this code to replace it and it does replace the type but the script is not applied to the site.
<script>document.querySelector("#myscript").setAttribute("type","text/javascript");<script>