Maybe a feature test like this one could be useful:
if($.browser.msie){
// IE stuff
if(Object.prototype.toString.call(self.JSON) === "[object JSON]"){
// IE8 stuff
} else {
// IE < 8 stuff
}
}
rather than a sniff, above code assumes JSON is native only in IE8 or
greater and there is no way to obtain the same result with every other IE
(or generally speaking every other browser)
Hope this helps.
Regards
On Thu, Mar 5, 2009 at 7:24 PM, Matt Kruse <[email protected]> wrote:
>
> On Mar 4, 3:26 pm, lrbabe <[email protected]> wrote:
> > I'm aware that jQuery promotes features detection over browser
> > sniffing but currently we provide no way for the user to figure out
> > easily when the browser is IE8 operating in the so called
> > "compatibility mode".
>
> Why would you need to detect this? What problem are you trying to
> solve?
>
> This is exactly why any type of browser sniffing is inherently error-
> prone, and feature-detection strategies should be used instead.
>
> Matt Kruse
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---