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!
No comments:
Post a Comment