Would you mind submitting a patch with tests?
On May 25, 12:01 pm, Johan Arensman <johanm...@gmail.com> wrote:
> Hello everyone,
> I was just checking out some of my code to see if I could optimize it and I
> noticed that in event handlers the event.stop() method has to be
> called separately from all other code. Something I like about prototype is
> that a lot of methods can be chained like the Element methods
> (e.addClassName('bla').insert(foo).toggle().observe('click', bar).......).
> But instead of returning the event, event.stop() returns 'undefined' making
> it impossible to do something like this:
> var e = event.stop().findElement('a');
> and forcing me to use 2 lines:
> var e = event.findElement('a');
> I've added 'return event;' at the bottom of the stop method in Event.Methods
> and it works perfectly (in FireFox, haven't tested in other browsers). Is it
> possible to make this small change? Or is there a reason why the event isn't
> Johan Arensman
> You received this message because you are subscribed to the Google Groups
> "Prototype: Core" group.
> To post to this group, send email to firstname.lastname@example.org
> To unsubscribe from this group, send email to
> For more options, visit this group
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to
For more options, visit this group at