Side navigation
#12242 closed bug (wontfix)
Opened August 10, 2012 11:46AM UTC
Closed August 10, 2012 03:43PM UTC
Last modified August 17, 2012 05:40AM UTC
$.browser doesn't report webkit in Chrome anymore
Reported by: | bundyo@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | misc | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.browser, when ran in Chrome and jQuery 1.7.1 reports
safari: true
version: "534.11"
webkit: true
In 1.8.0 it reports
chrome: true
version: "21.0.1180.60"
which is correct, but it should at least include webkit: true, as it is still a WebKit-based browser. I know $.browser is deprecated, but still.
Attachments (0)
Change History (6)
Changed August 10, 2012 03:43PM UTC by comment:1
component: | unfiled → misc |
---|---|
priority: | undecided → low |
resolution: | → wontfix |
status: | new → closed |
Changed August 10, 2012 03:49PM UTC by comment:2
Also, in 1.9 jQuery.browser will no longer be in the core library
Changed August 10, 2012 03:55PM UTC by comment:3
This was introduced in 1.8 as a result of the new Chrome detection. So it just goes to show, no good deed goes unpunished.
I'm inclined to leave $.browser
as-is since it's been deprecated since 1.3 and will be gone in 1.9. If you need to know the actual browser/version and expect to need that in the future, it would be better for you to parse navigator.userAgent
directly.
Changed August 10, 2012 04:53PM UTC by comment:4
The problem is that it introduces a breaking change where it shouldn't - the rendering engine in Chrome is still Webkit regardless of the javascript engine and the 3D rendering. However, it doesn't really affect me, so it is up to jQuery to decide how to handle it, if at all.
Changed August 17, 2012 05:31AM UTC by comment:5
Simple, add this to your project
jQuery.browser.webkit = !!jQuery.browser.chrome;
I highly doubt anyone on the core team would care enough about $.browser to make sure it works beyond the current tests.
Besides,
$.browser.webkit
is becoming less and less useful with Chrome and Safari continually diverging their webkit codepaths.