summaryrefslogtreecommitdiff
path: root/itjs/it.js
diff options
context:
space:
mode:
authorNathan Gass2011-12-13 13:36:48 +0000
committerNathan Gass2011-12-13 13:36:48 +0000
commit4e273dd5062c54d34c7de3de6890584ce142dd8f (patch)
tree5fc19181a16aeaf5c060f60333d16b1a36b6d8d0 /itjs/it.js
parentced5bfa06c5003ca03d17838c59e7bc4290c2d4d (diff)
downloaditools-4e273dd5062c54d34c7de3de6890584ce142dd8f.tar.gz
itools-4e273dd5062c54d34c7de3de6890584ce142dd8f.tar.bz2
itools-4e273dd5062c54d34c7de3de6890584ce142dd8f.zip
factor out D() from ED() consistent with php
Diffstat (limited to 'itjs/it.js')
-rw-r--r--itjs/it.js23
1 files changed, 15 insertions, 8 deletions
diff --git a/itjs/it.js b/itjs/it.js
index a48d829..54fa5c7 100644
--- a/itjs/it.js
+++ b/itjs/it.js
@@ -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>';
}
/**