Hi,
I ran across a weird bug in MochiKit.Style.getElementPosition causing
FF to throw evil C++ exceptions into the console:
http://trac.mochikit.com/ticket/332
Debugging the MochiKit code I ended up looking at the following piece
of black magic:
getElementPosition: function (elem, /*
I often use the following utility function:
function connectEach(iterable, signal, dest, func){
forEach(iterable, function(el){
connect(el, signal, dest, func);
});
}
It might be used as follows:
connectEach($$('#my-ul li'), 'onclick',
Hi
On 12.12.2008, at 16:45, Eoghan eoghanomur...@gmail.com wrote:
connectEach($$('#my-ul li'), 'onclick', function(e){
// do sumn'
});
rather than slightly more unwieldy:
forEach($$('#my-ul li'), function(el){
connect(el, 'onclick', function(e){
On Dec 12, 7:20 pm, Arnar Birgisson arna...@gmail.com wrote:
Hi
On 12.12.2008, at 16:45, Eoghan eoghanomur...@gmail.com wrote:
connectEach($$('#my-ul li'), 'onclick', function(e){
// do sumn'
});
rather than slightly more unwieldy:
forEach($$('#my-ul
On Fri, Dec 12, 2008 at 11:20 AM, Arnar Birgisson arna...@gmail.com wrote:
Hi
On 12.12.2008, at 16:45, Eoghan eoghanomur...@gmail.com wrote:
connectEach($$('#my-ul li'), 'onclick', function(e){
// do sumn'
});
rather than slightly more unwieldy:
Hi,
On Sat, Dec 13, 2008 at 00:45, Bob Ippolito b...@redivi.com 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