public/javascripts/yui/event/event-debug.js
function(p_type, p_fn, p_obj, overrideContext) {

        this.__yui_events = this.__yui_events || {};
        var ce = this.__yui_events[p_type];

        if (ce) {
            ce.subscribe(p_fn, p_obj, overrideContext);
        } else {
            this.__yui_subscribers = this.__yui_subscribers || {};
            var subs = this.__yui_subscribers;
            if (!subs[p_type]) {
                subs[p_type] = [];
            }
            subs[p_type].push(
                { fn: p_fn, obj: p_obj, overrideContext: overrideContext } );
        }
    }
function(p_type, p_fn, p_obj, overrideContext) {

        this.__yui_events = this.__yui_events || {};
        var ce = this.__yui_events[p_type];

        if (ce) {
            ce.subscribe(p_fn, p_obj, overrideContext);
        } else {
            this.__yui_subscribers = this.__yui_subscribers || {};
            var subs = this.__yui_subscribers;
            if (!subs[p_type]) {
                subs[p_type] = [];
            }
            subs[p_type].push(
                { fn: p_fn, obj: p_obj, overrideContext: overrideContext } );
        }
    }
function ( p_type , p_fn , p_obj , overrideContext ) { this . __yui_events = this . __yui_events || { } ; var ce = this . __yui_events [ p_type ] ; if ( ce ) { ce . subscribe ( p_fn , p_obj , overrideContext ) ; } else { this . __yui_subscribers = this . __yui_subscribers || { } ; var subs = this . __yui_subscribers ; if ( ! subs [ p_type ] ) { subs [ p_type ] = [ ] ; } subs [ p_type ] . push ( { fn : p_fn , obj : p_obj , overrideContext : overrideContext } ) ; } }
Subscribe to a CustomEvent by event type

@method subscribe
@param p_type     {string}   the type, or name of the event
@param p_fn       {function} the function to exectute when the event fires
@param p_obj      {Object}   An object to be passed along when the event
fires
@param overrideContext {boolean}  If true, the obj passed in becomes the
execution scope of the listener
Subscribe to a CustomEvent by event type