adamschwartz / log

Console.log with style.
https://adamschwartz.co/log
MIT License
3.01k stars 139 forks source link

Fallback for unsupported browsers #21

Closed Acen closed 11 years ago

Acen commented 11 years ago

Doesn't come up with anything in unsupported browsers.

Perhaps still allowing non-formatted versions of the errors to still be shown. Some sort of graceful degradation maybe.

adamschwartz commented 11 years ago

In non-supported browsers, the fallback is you see the extra syntax. So for example, you would see _italic_ instead of italic.

Unfortunately, at the moment, it's not possible to detect CSS support for console.log in any browser. So the approach we've taken is to do some specific browser version testing to make this work. Not great, we know. But since log is meant as a development tool (with some safety, since if you accidentally committed log('_foo_') you wouldn't break any pages), we're OK with this until a feature test is available.