Skip to content

Instantly share code, notes, and snippets.

@ah01
Created January 31, 2011 11:54
Show Gist options
  • Save ah01/803945 to your computer and use it in GitHub Desktop.
Save ah01/803945 to your computer and use it in GitHub Desktop.
Tune Up jsFidler
(function () {
var output;
function getOutput () {
if (!output) {
output = document.body.appendChild(document.createElement("pre"));
}
return output;
}
// Call these functions only after DOM Ready!
window.log = function (text) {
getOutput().innerHTML += text + "<br>";
}
window.assert = function (value, description) {
var item = document.createElement("div");
item.style.color = value ? "green" : "red";
item.innerHTML = description;
getOutput().appendChild(item);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment