未安装时忽略firebug控制台 [英] ignore firebug console when not installed

查看:123
本文介绍了未安装时忽略firebug控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Firebug的console.log()调试我的网站。如果我尝试在没有Firebug的浏览器中查看我的网站,那么我会得到 控制台未定义 错误。
有没有办法正常避免此错误?

I use Firebug's console.log() for debugging my website. If I try viewing my website in browsers without Firebug then I get a console is not defined error. Is there a way to gracefully avoid this error?

我发现这个潜在的解决方案,但看起来有点麻烦。
和想法?

I found this potential solution, but it seems a bit cumbersome. And ideas?

推荐答案

Firebug源代码提供了一个文件:

Firebug source code provides a file to do this :

请参见 firebugx.js

不要每天重新发明轮子:)

这篇关于未安装时忽略firebug控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆