Skip to main content

Bug Tracker

Side navigation

#13228 closed bug (notabug)

Opened January 16, 2013 04:48AM UTC

Closed April 05, 2013 01:39AM UTC

Fail with notice if jQuery 2.0 is loaded on oldIE or newIE in compat mode

Reported by: dmethvin Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0b1
Keywords: Cc:
Blocked by: Blocking:
Description

In most cases we try to "do no harm" when we run in an unsupported browser, for example by testing for the missing API calls and doing nothing or returning the least messed-up value.

There is so much missing in oldIE I can't imagine that approach will work. I'm thinking we need some clear way to notify the user/dev that they did something wrong. We could pop an alert(), or perhaps change document.title.

Attachments (0)
Change History (10)

Changed January 21, 2013 07:21PM UTC by timmywil comment:1

Is it out of the question to take each case as it comes and continue trying to do no harm?

Changed January 21, 2013 07:22PM UTC by timmywil comment:2

status: newopen
version: git2.0b1

Changed January 21, 2013 07:33PM UTC by rwaldron comment:3

It might be reasonable to throw "This browser requires jQuery 1.9"... but I'm more inclined to agree with timmywil and see what happens

Changed February 05, 2013 01:41PM UTC by shalecraig comment:4

I think I have a base idea of where to start implementing this:

It's generally a better idea if the individual web developer is told that their user is using a browser that isn't supported, and then allow the web developer to decide what to do with this information. This would probably be done through a deferred call on a jQuery object.

We could implement this by requiring each base jQuery module to verify necessary apis exist. This could be done with dependency lists, or some other implementation.

Once one of these "dependency lists" is not met, the deferred can be called, and the developer can be notified.

Changed February 05, 2013 01:56PM UTC by dmethvin comment:5

There would be a lot of overhead to implementing something that general. If the list of browsers dropped ends up being just oldIE, a test as simple as if ( window.attachEvent && !window.addEventListener ) suffices.

Changed February 05, 2013 07:39PM UTC by scraig comment:6

Isn't it a better practice to filter through functionality instead of a per-browser basis?

Changed February 05, 2013 07:46PM UTC by scottgonzalez comment:7

We're not really concerned with theoretical browsers or changing implementations here. We're talking about developers loading jQuery 2.x into a known set of browsers (oldIE) and providing a warning. The chances of the proposed check providing a false positive are extremely slim.

Changed March 27, 2013 11:16PM UTC by eddiemonge comment:8

If they are using 2.0 shouldn't they know oldIE isn't supported?

Changed April 01, 2013 04:33PM UTC by timmywil comment:9

This doesn't feel right. I'm fine with the warnings in the upgrade plugin. Not so much in core.

Changed April 05, 2013 01:39AM UTC by dmethvin comment:10

resolution: → notabug
status: openclosed

I'm gonna close this for now, and if/when complaints come in we can reopen.