Referencing Firebug Console Inside of a Custom Javascript Object
I have 开发者_如何学Pythonseveral custom Javascript objects and want to do some debugging via the Firebug console inside of them. However, if I try to use console.log(), I get an error about console not being defined. I tried referencing console as window.console and it made no difference. When I run a check to see if console is defined, it returns false:
if(window.console && window.console.firebug)
So, my question is, how can I reference the Firebug console inside of my custom objects so that I can do my debugging?
After searching around a bit and trying different things, I believe the problem was being caused by the ColorZilla Firefox extension. I disabled it and re-started Firefox and my console statements now work.
Hopefully this will save others a lot of time and frustration!
精彩评论