Opera Detection Revamped?

I am surfing in a nightmare of problems with IE and Opera right now ... all these problems come from sessionStorage implementation ... I am almost there, but right now just think about this question:

How to know if onload and unload event are supported without firing them?

Apparently, it has never been that simple!

Object.prototype.toString
.call(window.opera) ===
"[object Opera]"
;

Enjoy

P.S. Prototype Framework uses this trick since version 8, I had no idea about that! Good one!

Comments

Popular posts from this blog

8 Things you should not be afraid of as a Developer

News

Why REST is so important