Hacker News new | ask | show | jobs
by wolco 3029 days ago
safari and older ie versions. 10 for sure.

Remember when console.log broke ie? Debugging was fun.

4 comments

Remember when console.log was available when the dev tools were open but would be undefined otherwise, so your code would break unexpectedly but then work fine when you tried to figure out what went wrong?
Oh gaahd, It's all coming back to me now. function log(msg) { if (console.log) console.log(msg) }
> safari and older ie versions. 10 for sure.

This is false information about Safari. In fact, Safari was the first browser to implement 100% ES2015 support.

https://developer.apple.com/safari/technology-preview/releas...

It was terrible when the only thing you could do was alert your variables!
Back in the day I used LiveConnect[1] for this and other purposes[2]. I would dump errors to an IRC server so that I could collect the results. I could also respond with code that would be eval'd making development very easy.

[1]: https://developer.mozilla.org/en-US/docs/Archive/Web/LiveCon...

[2]: http://geocar.sdf1.org/ajaj.html

> I could also respond with code that would be eval'd making development very easy

In dev only, I hope?! I honestly love the idea as a super fun hack, but the security implications for prod are terrifying.

Not sure there was much risk: The web application used a private IRC server with name+password registered users. L3 support who /msg'd a user session some JavaScript doesn't seem likely as the messages were all logged, and anyone with fileserver access could just put whatever they want in the <script> tag anyway...
It doesn’t break Safari.
version 9 and below it breaks