Mislav's when() seems a bit redundant when called inside of

I think this topic would be interesting to discuss in the the proto-dev
mailing list, ie. exceptions thrown for non-existant elements... i'd also
like to see some kind of support for catching stupid coding: documents with
elements that have the same id (like... <div id=myDiv></div>  <div
id=myDiv></div>...ugh.) I wrote a snippet that used mutation events to check
the document for junk like this, but sadly, DOMContentLoaded,
DOMNodeInsterted et al aren't supported widely enough to warrant production
level usage.


On Sat, Sep 19, 2009 at 8:39 AM, Radoslav Stankov <rstan...@gmail.com>wrote:

> You can use something like my CD3.Behavior lib (
> http://github.com/RStankov/controldepo-3-widgets/blob/master/src/behaviors.js
> )
> <code>
> CD3.Behaviors({'#element:click': yourClickHandler });
> // -- or --
> CD3.Behaviors('#element', function(){
>  this.observe('click', yourClickHandler);
> });
> // -- or ... CD3.Behaviors have really large set of possible uses
> </code>
> Or ... use Mislav's when() function
> http://mislav.uniqpath.com/js/when-available-in-prototype/
> >

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 
For more options, visit this group at 

Reply via email to