ignore firebug console when not installed

后端 未结 9 1338
旧时难觅i
旧时难觅i 2021-02-02 04:15

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 er

9条回答
  •  無奈伤痛
    2021-02-02 04:59

    I don't think it gets much better than the workaround you link to. It's of course possible to melt it down to just defining console.log() and leave off rest, but in essence, you won't get around a construct like this.

    Only alternative that comes to mind is checking for console.log every time you call it, and that's even more cumbersome.

提交回复
热议问题