3 ms·
Not only that, you have to save a reference to the parts of the console that you want to use just in case they attempt to destroy those. var c = console
by jQueryIsAwesome 14y ago
Not only that, you have to save a reference to the parts of the console that you want to use just in case they attempt to destroy those.
var c = console
var l = console.log
var log = function(){ l.apply(c, arguments) }
Now they can't break the console from working with stuff like:
console.log = function(){}
- chadscira 14y agowell in that case i guess you could always do var _console = console; console = undefined;
- jQueryIsAwesome 14y agoYou may break something by breaking it yourself, like naive code: if (window.chrome) console.log("dev forgot to delete this"))