Hi,
I am using firebug for debugging etc.
When I deploy, it seems as though I have to remove all the console.log statements from my javascript code?
When viewing on a browser that doesn't have firebug I am getting errors relating to console...
From stackoverflow
Blankman
-
Yes, they will make IE error as IE does not have the console.
It's also good practice.
Chase Seibert : It seems error prone, to me. I like StuffMaster's solution better.Steerpike : I mean it's simply good practice to remove debugging messages from any code before you deploy.From Steerpike -
I used this post to create a log function. It will avoid those errors.
function log(string) { if (window.console && window.console.firebug) { console.log(string); } }It's also easier to type :)
From StuffMaster
0 comments:
Post a Comment