public/javascripts/yui/slider/slider.js
function (o,evt) {
        var ce,i,len,j,subs,newSubs;

        if (o.__yui_events && o.events[evt]) {
            for (i = o.__yui_events.length; i >= 0; --i) {
                if (o.__yui_events[i].type === evt) {
                    ce = o.__yui_events[i];
                    break;
                }
            }
            if (ce) {
                subs    = ce.subscribers;
                newSubs = [];
                j = 0;
                for (i = 0, len = subs.length; i < len; ++i) {
                    if (subs[i]) {
                        newSubs[j++] = subs[i];
                    }
                }
                ce.subscribers = newSubs;
            }
        }
    }
function (o,evt) {
        var ce,i,len,j,subs,newSubs;

        if (o.__yui_events && o.events[evt]) {
            for (i = o.__yui_events.length; i >= 0; --i) {
                if (o.__yui_events[i].type === evt) {
                    ce = o.__yui_events[i];
                    break;
                }
            }
            if (ce) {
                subs    = ce.subscribers;
                newSubs = [];
                j = 0;
                for (i = 0, len = subs.length; i < len; ++i) {
                    if (subs[i]) {
                        newSubs[j++] = subs[i];
                    }
                }
                ce.subscribers = newSubs;
            }
        }
    }
function ( o , evt ) { var ce , i , len , j , subs , newSubs ; if ( o . __yui_events && o . events [ evt ] ) { for ( i = o . __yui_events . length ; i >= 0 ; -- i ) { if ( o . __yui_events [ i ] . type === evt ) { ce = o . __yui_events [ i ] ; break ; } } if ( ce ) { subs = ce . subscribers ; newSubs = [ ] ; j = 0 ; for ( i = 0 , len = subs . length ; i < len ; ++ i ) { if ( subs [ i ] ) { newSubs [ j ++ ] = subs [ i ] ; } } ce . subscribers = newSubs ; } } }
Clean up the slideEnd event subscribers array, since each one-time
callback will be replaced in the event's subscribers property with
null.  This will cause memory bloat and loss of performance.
@method _cleanEvent
@param o {EventProvider} object housing the CustomEvent
@param evt {string} name of the CustomEvent
@private
Clean up the slideEnd event subscribers array since each one - time callback will be replaced in the event s subscribers property with null . This will cause memory bloat and loss of performance .