Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This was still an IE "bug" at least up to 11 IIRC. If you had the console open then `console.*()` worked but if the console was not open then you would get an error. So frustrating to have the problem "go away" when you tried to dig into the issue more. At my last company we had some logic that ran first that would proxy all the console.log calls through some code that would check if IE and if the console was open before trying to call the native console.log and friends.


We recommended to have logging feature flagged, or create a fake console object, but there were a lot of methods. Having the browsers just implement something worked better. You never knew where a statement could still be deep in code.

I guess today, the instructions would be `console?.log()` not that it matters now. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: