Firebug console log proxy


/ Published in: JavaScript
Save to your folder(s)

prevent errors on non-firebug browsers


Copy this code and paste it in your HTML
  1. // prevent errors on non-firebug browsers
  2.  
  3. (function() {
  4. var f = function() {};
  5. var c = {
  6. info: f,
  7. log: f,
  8. assert: f,
  9. warn: f,
  10. error: f,
  11. dir: f,
  12. group: f,
  13. groupEnd: f
  14. };
  15.  
  16. if(!window.console)
  17. window.console = c;
  18. })();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.