src/event.js
// the callback to all events fired.
the callback to all events fired.
the callback to all events fired .
on(name, callback, context) {
        if (!eventsApi(this.event, 'on', name, [callback, context]) || !callback) return this;
        this._events || (this._events = {});
        const events = this._events[name] || (this._events[name] = []);
        events.push({
            callback,
            context,
            ctx: context || this,
        });
        return this;
    }
on ( name , callback , context ) { if ( ! eventsApi ( this . event , 'on' , name , [ callback , context ] ) || ! callback ) return this ; this . _events || ( this . _events = { } ) ; const events = this . _events [ name ] || ( this . _events [ name ] = [ ] ) ; events . push ( { callback , context , ctx : context || this , } ) ; return this ; }
the callback to all events fired.
the callback to all events fired .