Hi,

On Sat, Dec 13, 2008 at 00:45, Bob Ippolito <[email protected]> wrote:
> connect(["#my-ul li"], "onclick", ...);

I agree this looks a little bit too magical. Perhaps more "expected"
would be to allow the first argument to be a list, but in that case a
list of elements (or strings passed to getElement). The selector case
is then simply:

connect($$("#my-ul li"), "onclick", ...);

As for the return, this would return a list. I.e.

connect(elements, event, handler) {
    if (isIterable(elements)) {
        return map(function (el) {connect(el, event, handler);}, elements);
    } else {
        // current connect code for a single element
    }
}

cheers,
Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to