Working on a Single Page Architecture project, there are a lot of *.js
files lazy loaded to DOM.
The file getting included may not have the line "use strict";
but the solution should force "use strict";
for all js files included after loading the initial scripts (Application library files).
Maybe you can use ajax to get the scripts text and append the
"use strict";
to the scripts andeval()
it or append it to body as<script>
tag. Example using jQuery: