Last modified: 2011-03-13 18:06:06 UTC
It would actually probably be best to allow extending Site or Extension JS to use special IE only JS pages. As in, those through IE's conditional comments. Or have those scripts automatically add the is_ie and is_ie_?? variables to get the best compatibility.
Why not simply add belo the other conditionals:
And anything more detailed than that can check the browser agent version.
Although in wikibits.js, should be something like:
if(!window.is_msie) var is_msie = false;
Then you can simply check if(is_msie) or if(!is_msie).
Maybe a little more than that... like a is_msie_7, because there is a lot new in IE 7 which will break in previous versions. Same for 6 because the 5 and olders don't have as much as it.
(In reply to comment #3)
> Maybe a little more than that... like a is_msie_7, because there is a lot new
> in IE 7 which will break in previous versions. Same for 6 because the 5 and
> olders don't have as much as it.
Do we really have to repeat the mistakes of the past? Globals are bad because they can't be lazy-initialised. This is true in both JS and PHP.
If you need the result of a computation, you should call a function to get it, not run the computation on every request and make the result available via a global variable.