4 ms·
but then we could just ensure that this line gets called first console.profile = console.profileEnd = function () {};
by chadscira 14y ago
but then we could just ensure that this line gets called first
console.profile = console.profileEnd = function () {};
- jQueryIsAwesome 14y agoNot 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"))