On Feb 25, 11:59 am, brian <bally.z...@gmail.com> wrote:
> Conditional Comments are great and all (best thing to come from MS
> since asynchronous requests) but they're not the best solution here,
> IMHO. Whether it's the browser or a feature that needs detecting, it's
> often required somewhere in the middle of some routine. Using CC,
> you'd need to duplicate your method, object, whatever.

That's not true. I do things like this:

// This is a better check than looking at userAgent!
useIframe:/*...@cc_on @*//*...@if (@_win32) true, @else @*/false,/*...@end @*/

Anyone who thinks they have a need to check the browser would benefit
from reading more about feature detection and why it is almost always
a better strategy. It just doesn't come naturally at first for many,
and you might struggle through some "yeah, BUT!" moments, but in the
end you'll be better off.

Matt Kruse

Reply via email to