ianyang — 2010-05-16T03:13:37-04:00 — #1
Is there any exclusive Firefox DOM property or method? Such as window.opera of Opera and window.ActiveXObject of IE.
logic_ali — 2010-05-16T08:25:51-04:00 — #2
I know of one property which looks likely to be and remain unique, but why do you think you need to detect this browser?
ianyang — 2010-05-17T05:26:50-04:00 — #3
Okay, thank you.
paul_wilkins — 2010-05-16T17:47:57-04:00 — #4
Performing browser detection is the last thing you want to do, because you are guaranteeing that anything which is not Firefox but has the same problem, isn't going to be fixed.
Also, if Firefox is updated to fix that problem, you may be trying to fix something that doesn't need to be fixed any more, which ends up making things worse for yourself.
Instead, perform object detection where you check for the problem that needs to be fixed, and should that problem be there you can then do something about it.
What is the problem that needs to be fixed? As it is a common situation, there will be a common solution that resolves the issue for you.
ianyang — 2010-05-16T09:37:40-04:00 — #5
Because of performance issue. Using DOM property or method is faster than doing regular expression test in navigator.userAgent.
logic_ali — 2010-05-16T10:10:33-04:00 — #6
No - I meant why do you think you need to perform any form of detection for this browser?
ianyang — 2010-05-16T10:21:36-04:00 — #7
It is a common situation. Sometimes you want to define some functions only for Firefox.