Question

I made a plugin with Firebreath, with a custom event, and I would like to register a callback with YUI Event.

Y.on( "mycustomevent", callback, pluginNode );

Does not register my callback, whereas

pluginNode.addEventListener( "mycustomevent", callback, false );

does (on Firefox, not on IE).

How can I use YUI to register my event?

Was it helpful?

Solution

I found the solution. Adding my event to Y.Node.DOM_EVENTS, it works:

Y.mix( Y.Node.DOM_EVENTS, {
    mycustomevent: 1
} );
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top