#13435 closed bug (notabug)
Missing $.browser in 1.9
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.browser is mainly been used when for special tricks and tuning code for particular browser.
In 1.9 using feature detection doesn't make sense, because of logic - now we have to make assumption based on some special feature existence.
Before 1.9:
if (isIE) then
doFixWidth()
1.9:
if (hasSpecialFeature) then
doFixWidth()
This code will be broken as soon as special feature become not special.
Change History (3)
comment:1 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Migration plugin is not solution.
Feature detection is just workaround which breaks logic and doesn't make sense, when 'feature' I try to exploit is not listed.
comment:3 Changed 10 years ago by
Executing code for all browsers of a certain type with $.browser.msie
or $.browser.safari
doesn't make sense. There isn't a lot of commonality between IE6 and IE10, or Safari 4 and Safari 6. That's why browser detection sucks. Feel free to interpret whatever you want of navigator.userAgent
since that's all $.browser
is doing.
http://jquery.com/upgrade-guide/1.9/