This project is archived and is in readonly mode.

#1112 ✓wontfix
Arieh

Async Event Firing

Reported by Arieh | December 7th, 2010 @ 10:50 PM

I've also opened a discussion on the user group, so I'll only do a highlight:
JS native events all fire their functions async. This is true for DOM events, but we're also seeing this now with SSJS via Node.js.
IMHO - this should also be applied to Class events, as not doing so creates an unpredictable, untestable variant that breaks event encapsulation.

Since Class events don't have a "preventDefault" mechanism, fixing this issue is in fact as simple changing line 72 on Class.Extras from

if (delay) fn.delay(delay, this, args);


//to


fn.delay(delay || 0,this,args);
https://github.com/mootools/mootools-core/blob/master/Source/Class/...

Comments and changes to this ticket

  • Christoph Pojer

    Christoph Pojer December 16th, 2010 @ 04:51 PM

    • State changed from “new” to “wontfix”

    We are not going to include this functionality into MooTools events. Feel free to create a plugin "AsyncEvents" which does exactly that. A user can then optionally use this implementation of Events without affecting all MooTools code ever created. Please put it on the forge so everyone can try it out and we can reiterate in the future :)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages