@TJ
Yeah. I sort of noticed that.
I like the observeAll mechanism. Very reusable.
In PHP, I could ...
if (!!fn || fn = function(){...}) {
fn();
}
sort of thing. Basically assign a value to a variable and evaluate the
assignment. For closures, this is always true.
Could this be done in JS?
As usual, taking it to the space elevator! Thanks so much!
Walter
On Dec 23, 2010, at 10:21 AM, T.J. Crowder wrote:
@Richard:
Maybe something like ...
['keyup', 'click', 'focus', 'blur'].each(function(eventName){
$('filter').observe(eventName, function(evt){
this.fire('check:filter');
}