(sorry for the duplicate)

On Sat, Sep 22, 2007 at 12:11:27PM +0200, Frederico Caldeira Knabben <[EMAIL 
PROTECTED]> wrote:
> Thanks for the reply Mark. I've filled the following bug for it:
> 
>       http://bugs.webkit.org/show_bug.cgi?id=15256
> 
> 
> > On an unrelated note,
> > // For Safari and Opera, we must ensure the focus.
> > if ( (/safari/i).test( navigator.userAgent ) )
> >
> > It is almost never correct to test for "Safari" specifically.  WebKit is
> > what you should be aiming to detect.  This will ensure that your code
> > functions correctly in other WebKit-based browsers, such as OmniWeb,
> > Shiira, NetNewsWire, etc.
> 
> That was just useful for the TC. But you are right; I'll take care of using
> the recommended way:
> 
>       (/ AppleWebKit\//).test( navigator.userAgent )

Actually, this is as bad as testing for safari. You should test
features, not user agents.

Mike
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to