Last active
February 1, 2016 07:00
-
-
Save hyeonseok/48ff473ccedc303da73c to your computer and use it in GitHub Desktop.
console.log to screen, for those who debugs on old browser.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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