Mootools 不支持 transitionend enven?

Mootools does not supports transitionend enven?

$(element).addEvent('transitionend', function(e){
    // do soming...
});

在 firefox 中,它不起作用。但是,使用 addEventListener 而不是 addEvent,它可以工作。 mootools 不支持 css 事件吗?

对...引用 docs:

Not all events are supported by MooTools' Element Events API because of edge use cases or new events supported by the browser. To add support for a native event, just augment the Element.NativeEvents object with the key and appropriate key value (use the above). For example to add popstate support in your application:

Element.NativeEvents.popstate = 2;
// Now element.addEvent('popstate', fn); will work everywhere

所以你的情况很简单

Element.NativeEvents.transitionend = 2;

var foo = document.getElement('.foo');

foo.addEvent('transitionend', function(){
    alert('done');
});

foo.removeClass('bar');

在行动:http://jsfiddle.net/gf72uu37/

现在至少可以针对标准化和无供应商前缀的事件修复此问题。但浏览器支持将是不完整的,mootools 试图支持甚至 IE8...