Skip to content

Instantly share code, notes, and snippets.

@hyeonseok
Last active February 1, 2016 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyeonseok/48ff473ccedc303da73c to your computer and use it in GitHub Desktop.
Save hyeonseok/48ff473ccedc303da73c to your computer and use it in GitHub Desktop.
console.log to screen, for those who debugs on old browser.
<div id="trace" style="position: absolute; z-index: 99999; top: 0; right: 0; border: 2px solid #0c0; background: #fff; color: #0c0; font: 11px monospace;"></div>
<script>
var console = {
log: function trace() {
var msg = Array.prototype.slice.call(arguments).join(' ');
document.getElementById('trace').innerHTML += msg.toString() + '<br>';
}
}
console.log(navigator.userAgent);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment