#12242 closed bug (wontfix)
$.browser doesn't report webkit in Chrome anymore
Reported by: | 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.
Change History (6)
comment:1 Changed 10 years ago by
Component: | unfiled → misc |
---|---|
Priority: | undecided → low |
Resolution: | → wontfix |
Status: | new → closed |
comment:3 Changed 10 years ago by
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.
comment:4 Changed 10 years ago by
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.
comment:5 follow-up: 6 Changed 10 years ago by
Simple, add this to your project
jQuery.browser.webkit = !!jQuery.browser.chrome;
comment:6 Changed 10 years ago by
More like
jQuery.browser.webkit = !!jQuery.browser.chrome || jQuery.browser.webkit;
If you want it to work in Safari/other WebKit browsers too.
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.