On Aug 30, 2:06 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Why fix something that isn't broken?  You can play the hypothetical
> both ways without satisfaction.

I don't think so - in the case where it "isn't broken" then nothing
bad will result. The correction will not execute. In fact, it's less
code to take the better approach.
And how do you know it's not broken in another browser, and will never
be broken in any future browser? Fixing it only in the case you know
about right now is short-sighted and completely unnecessary.
Experienced Javascript developers could look at the cited code and use
it as a reason to question the coding in the library.

> What if another browser comes out
> that breaks when this fix is applied?

Is that even possible? And even if it somehow is, isn't it far less
likely than another browser coming out that has the same problem but
won't execute the fix because you've limited it to only safari?

Fixing browser-specific bugs using browser sniffing is highly suspect
and almost never necessary. In almost all cases, the bug/quirk can be
fixed in the general case without any check for browser.

Matt Kruse

Reply via email to