[Proto-Scripty] Extending Prototype.BrowserFeatures the right way?

2009-04-23 Thread Tim Snadden
Hi all - I've extended Prototype.BrowserFeatures and thought I'd check with those in the know whether this makes sense as an approach or how it could be improved. Basically I want to test to see if the browser supports setting border-radius with CSS so that I can only use javascript

[Proto-Scripty] Re: Extending Prototype.BrowserFeatures the right way?

2009-04-27 Thread Tim Snadden
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

[Proto-Scripty] Re: Prototype: 'Event.observe(window, 'load', function()...' HELP

2009-05-28 Thread Tim Snadden
On 28/05/2009, at 8:13 PM, gio wrote: Event.observe(window, 'load', function() { computeTotalForTable('cities'); }); Have a look at observing 'dom:loaded' rather than 'load'. Info here: http://www.prototypejs.org/api/document/observe --~--~-~--~~~---~--~~