Bug Tracker

Opened 7 years ago

Closed 7 years ago

#13228 closed bug (notabug)

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.

Change History (10)

comment:1 Changed 7 years ago by timmywil

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

comment:2 Changed 7 years ago by timmywil

Status: newopen
Version: git2.0b1

comment:3 Changed 7 years ago by Rick Waldron

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

comment:4 Changed 7 years ago by shalecraig

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.

comment:5 Changed 7 years ago by dmethvin

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.

comment:6 Changed 7 years ago by scraig

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

comment:7 Changed 7 years ago by scottgonzalez

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.

comment:8 Changed 7 years ago by Eddie Monge

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

comment:9 Changed 7 years ago by timmywil

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

comment:10 Changed 7 years ago by dmethvin

Resolution: notabug
Status: openclosed

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

Note: See TracTickets for help on using tickets.