@Arian:
Good job with modernizr. Thanks for pointing it out.

@Sanford:
Nice execution. Perhaps can be shortened a bit more:
var isGradientSupported = !!new Element('div').setStyle('background','-
moz-linear-gradient(red, blue)').getStyle('background');

The double bang will convert to false with the same rules as the
bitwise OR, as I recall.

@Arain and Sanford:

Why do you recommend checking for the css gradient support over the
browser version?

I would like to use a few different 3.6 specific rules.
'Feature' may be better than 'browser' check as a rule, but I do not
intend to check for all the features in either case.

For now I have implemented Eneko's solution:
window.hasOwnProperty('onhashchange');

Or, more mootoolsy:
Hash.has(window,'onhashchange');

'Course, being as I have no way to test it in FF3.5, I don't really
know if that works.


Any tips on why you prefer your method would be appreciated.
Thanks.




On Feb 13, 12:37 am, Sanford Whiteman <[email protected]>
wrote:
> > If so, how do I target 3.6 only? (I must provide gradients if the
> > browser does not handle the css).
>
> How about
>
> var isGradientSupported = !!new 
> Element('div').setStyle('background','-moz-linear-gradient(0 0, red, 
> orange)').getStyle('background') || false;
>
> (With better garbage collection, o'course.)
>
> -- S.

Reply via email to