>> > > You shouldn't need try/catch for merely testing types of certain > properties. I would check `borderRadius` first, since it's a standard > CSS3 property. `el` also needs to be `null`ed. I think a more > descriptive name for the test would be `hasBorderRadius` (instead of > `borderRadius`) - to denote that it is of a boolean value. > > ... > hasBorderRadius: (function(){ > var el = document.createElement('div'); > var s = el.style; > var result = typeof s.borderRadius == 'string' || > typeof s.MozBorderRadius == 'string' || > typeof s.WebkitBorderRadius == 'string'; > el = null; > return result; > })() > ... > > -- > kangax
Hey - I didn't want to clog up the list with noise, but just wanted to say thanks very much. Your input on this list is awesome. Cheers, Tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---