Disable JavaScript on window.open
- by sonofdelphi
I have a set of (X)HTML files that I need to open with window.open() from an application homepage. I am able to open these files and read the data within them.
function openFiles()
{
var files = document.querySelectorAll('td a'); //The list of files to scan is stored as links in an HTML table
for(var i = 0; i<files.length; i++){
//Open each file in a browser window
win = window.open(files[i].href);
//Can I prevent the JavaScript in these files from executing?
}
}
But the problem is that the scripts within the HTML files also get executed when opened like this. This is rather time-consuming and unnecessary; also, the scripts within those files may have side-effects.
Is there a way to prevent JavaScript from executing on load?