> The problem is if a browser comes along that does not support > standards, but will break even further if you try to apply the IE fix. > You may make things _worse_ by blindly applying the IE fix. Or > whatever browser it is that you have the fix for.
Broken is broken is broken. Broken + no fix = broken. Broken + wrong fix = broken. > It is preferable to have a browser be "broken" in the sense that a > standard method was tried and didn't work correctly, than to have a > bad fix applied and have unpredictable results. Ok - so what you're proposing here is something very different from what you said initially. You're saying: if (standards_supported || !use_ie_fix() ) use_standards_method() // non-ie, non-compliant, browsers are broken else apply_ie_fix() That I'm more ok with - because at least then we're pushing failing browsers in a generally-correct direction. > Properly handling older browsers is just a bonus when feature > detection is done correctly. In your case "Feature detection done correctly" is just another term for "having every known and theoretical permutation of a possible bug or bug in an API". It would have to include checks for all old browsers in addition to checks for all upcoming browsers - and provide fallbacks for all of them. At a point you have to draw a line and make an assumption. In this case we're making the assumption that newer browsers will support standards and we'll provide workarounds for known bugs with known solutions. Feature detection does absolutely nothing to protect against new, unknown, bugs. > there is no way to check up- > front to see if everything is going to work correctly. [snip] Isn't that exactly what I proposed? Doing the checks before the document ready is run and not running it if the battery of checks fails? > That is not the only place that jQuery is used, though. For example, > > <input onchange="$(this).doSomething()"> Uhhh... yes, someone could do that - but not only do we not encourage it (no documentation, etc.) but we actively disapprove of it as well. In short: If you're designing your site using good graceful degradation techniques to begin with, you'll get the benefit that we provide. > This can be tricky. What if a particular browser has an opacity bug > with no fix and doesn't pass the "support" test, but works with > everything else? Then we should either 1) Not support that browser or 2) Remove that feature. We guarantee, with jQuery, that any API feature that we provide will work in every browser that we support. If we can't guarantee that then we need to take one of the above steps. > If I never mess with opacity in my scripts, why > should every other function of jQuery become unavailable? That is the question - but more accurately, that's the importance of actively testing all API methods in all browsers that you support - if there's functionality that we can't support then we should degrade. > That means you could then add a lot of different levels of jQuery > "support", and the developer could choose what they require and make > sure that it is available. This might be logically best, but it could > also create a mess. There may be a place in the middle that is ideal. I think it should be all or nothing - and we should work to make jQuery as inclusive as possible. > Consider an IE6 user in an environment where the administrators have > disabled ActiveX and ajax is not available. What happens? Will jQuery > choke, or continue to function in the most optimal way? Is there any > way for me, the author of a jQuery plugin, to know that some features > will not work correctly and should not be called? And how can I plan > for graceful degradation if I don't know where things will randomly > fail? It's very possible that that's a situation that we just don't support. Considering that, in that case, an exception would be thrown when the Ajax request was created - if a user, or a plugin, especially cared they would watch for the exception to be thrown. Ideally, though, we should provide some level of fallback - barring that, just not support that browser in that situation and gracefully degrade. --John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---