Skip to main content

Bug Tracker

Side navigation

#13435 closed bug (notabug)

Opened February 11, 2013 06:39PM UTC

Closed February 11, 2013 06:54PM UTC

Last modified February 11, 2013 07:04PM UTC

Missing $.browser in 1.9

Reported by: uriiniix@gmail.com 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.

Attachments (0)
Change History (3)

Changed February 11, 2013 06:54PM UTC by rwaldron comment:1

resolution: → notabug
status: newclosed

Changed February 11, 2013 06:59PM UTC by uriiniix@gmail.com comment:2

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.

Changed February 11, 2013 07:04PM UTC by dmethvin comment:3

_comment0: 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 IE0, 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.1360609507742905

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.