[Phpmyadmin-devel] using window.opera in js to workaround Opera getAttribute bug

Michael A. Puls II shadow2531 at gmail.com
Wed Aug 15 21:46:31 CEST 2007


I asked a question on the SquirrelMail dev list about this code <
http://squirrelmail.svn.sourceforge.net/viewvc/squirrelmail/trunk/squirrelmail/templates/default/js/default.js?view=markup
>.

In short, there are comments in the code about Opera returning invalid
values for getAttribute. Then, window.opera is used to detect Opera
and make sure it doesn't get IE code.

The check for window.opera doesn't seem to be necessary for Opera to
get the same code as safari and Firefox in this case and I'm not sure
what getAttribute bug is being worked around. (It looks like they
thought Opera had a bug because it didn't do like IE or something.)

Anyway, it was suggested that the js code might be from PHPMyAdmin
(which I have absolutely no clue if it is) and that I should ask
around here.

Please see < http://thread.gmane.org/gmane.mail.squirrelmail.devel/8836
> and read each post.

The thread describes in more detail on what the issues are and the concerns.

If the code is really from PHPMyAdmin and the issues still exist,
there may be some room for cleanup. If there really is a getAttribute
bug to be worked around, the thread describes a better way than using
window.opera.

If not, carry on.

Thanks.

-- 
Michael




More information about the Developers mailing list