From 4164f9c2956a76f1335f7413e02e2f8cb870a960 Mon Sep 17 00:00:00 2001 From: David Flatz Date: Tue, 23 Apr 2013 13:54:30 +0000 Subject: load javascript files separately when debugging to get the right linenumbers --- itjs/boot.js | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'itjs/boot.js') diff --git a/itjs/boot.js b/itjs/boot.js index 5261405..dd5169d 100644 --- a/itjs/boot.js +++ b/itjs/boot.js @@ -235,16 +235,40 @@ function it_boot(file, isretry) { var doc = document; var dom = doc && (dom = doc.getElementById('it_boot_dom')); // HTML has been rendered + var files = []; it_boot.sequence += "n"; bootparam += "&script=1"; + if (jsdebug) { + var path = file.match(/^(.*\/)[^\/]*$/)[1]; + var params = file.match(/\?.*$/)[0]; + var imports = file.split(','); + for (var i=0; i= 0)) - document.write('<\/sc'+'ript>'); + if (window.opera || (document.all && navigator.platform.indexOf("Mac") >= 0)) { + for (var i=0; i < files.length; i++) + document.write('<\/sc'+'ript>'); + } else if (dom) { - var tag = doc.createElement("script"); - tag.src = it_boot_addparam(file, bootparam); - dom.appendChild(tag); + for (var i=0; i < files.length; i++) { + var tag = doc.createElement("script"); + tag.src = files[i]; + dom.appendChild(tag); + } } else window.it_domtimer = window.setTimeout("it_boot('" + file + "')" , 42); -- cgit v1.2.3