diff options
Diffstat (limited to 'itjs')
-rw-r--r-- | itjs/it.js | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -11,16 +11,11 @@ function CED(txt) } /** - * Add debugging output to element 'jsdebug' + * Return string with dump of all arguments */ -function ED() +function D() { - var element; var text = ""; - - if (!(element = document.getElementById('jsdebug'))) - return; // var element = it_create_element(document.body, 'div', {id:'jsdebug', style:{position:'absolute', left:'100px', top:'10px', opacity:'0.8'}}) - for (var i = 0; i < arguments.length; i++) { var variable = arguments[i]; @@ -48,8 +43,20 @@ function ED() text += "\n"; } + return text; +} + +/** + * Add debugging output to element 'jsdebug' + */ +function ED() +{ + var element; + + if (!(element = document.getElementById('jsdebug'))) + return; // var element = it_create_element(document.body, 'div', {id:'jsdebug', style:{position:'absolute', left:'100px', top:'10px', opacity:'0.8'}}) - element.innerHTML += '<pre style="background-color:#FEE; margin:0">' + text + '<' + '/pre>'; + element.innerHTML += '<pre style="background-color:#FEE; margin:0">' + D.apply(this, arguments) + '<' + '/pre>'; } /** |