lib/kissy/5.0.0-alpha.3/lib/build/event/custom.js
function (type, fn, context) {
            var self = this;
            Utils.batchForType(function (type, fn, context) {
                var cfg = Utils.normalizeParam(type, fn, context), customEvent;
                type = cfg.type;
                customEvent = self.getCustomEventObservable(type, true);
                if (customEvent) {
                    customEvent.on(cfg);
                }
            }, 0, type, fn, context);
            return self;    // chain
        }
function (type, fn, context) {
            var self = this;
            Utils.batchForType(function (type, fn, context) {
                var cfg = Utils.normalizeParam(type, fn, context), customEvent;
                type = cfg.type;
                customEvent = self.getCustomEventObservable(type, true);
                if (customEvent) {
                    customEvent.on(cfg);
                }
            }, 0, type, fn, context);
            return self;    // chain
        }
function ( type , fn , context ) { var self = this ; Utils . batchForType ( function ( type , fn , context ) { var cfg = Utils . normalizeParam ( type , fn , context ) , customEvent ; type = cfg . type ; customEvent = self . getCustomEventObservable ( type , true ) ; if ( customEvent ) { customEvent . on ( cfg ) ; } } , 0 , type , fn , context ) ; return self ; // chain }
Subscribe a callback function to a custom event fired by this object or from an object that bubbles its events to this object.
@method on
@param {String} type The name of the event
@param {Function} fn The callback to execute in response to the event
@param {Object} [context] this object in callback
@chainable
Subscribe a callback function to a custom event fired by this object or from an object that bubbles its events to this object .