Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13435 closed bug (notabug)

Missing $.browser in 1.9

Reported by: uriiniix@… 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 7 years ago by Rick Waldron

Resolution: notabug
Status: newclosed

comment:2 Changed 7 years ago by uriiniix@…

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 7 years ago by dmethvin

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.

Last edited 7 years ago by dmethvin (previous) (diff)
Note: See TracTickets for help on using tickets.