diff options
author | Nathan Gass | 2011-12-13 13:36:48 +0000 |
---|---|---|
committer | Nathan Gass | 2011-12-13 13:36:48 +0000 |
commit | 4e273dd5062c54d34c7de3de6890584ce142dd8f (patch) | |
tree | 5fc19181a16aeaf5c060f60333d16b1a36b6d8d0 /itjs | |
parent | ced5bfa06c5003ca03d17838c59e7bc4290c2d4d (diff) | |
download | itools-4e273dd5062c54d34c7de3de6890584ce142dd8f.tar.gz itools-4e273dd5062c54d34c7de3de6890584ce142dd8f.tar.bz2 itools-4e273dd5062c54d34c7de3de6890584ce142dd8f.zip |
factor out D() from ED() consistent with php
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>'; } /** |