Jazz
Jazz

Reputation: 5917

Using YUI 3 Event with custom events in browser plugin

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?

Upvotes: 1

Views: 343

Answers (1)

Jazz
Jazz

Reputation: 5917

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

Y.mix( Y.Node.DOM_EVENTS, {
    mycustomevent: 1
} );

Upvotes: 2

Related Questions