backbone-baseview.js
function (events) {
            events = events || result(this, 'viewEvents');
            each(events, function (func, event) {
                var segs = event.split(' ');
                var listenTo = (segs.length > 1) ? this[segs[1]] : this;
                func = isFunction(func) ? func : this[func];
                if (listenTo) {
                    this.stopListening(listenTo, segs[0], func);
                    this.listenTo(listenTo, segs[0], func);
                }
            }, this);
            return this;
        }
function (events) {
            events = events || result(this, 'viewEvents');
            each(events, function (func, event) {
                var segs = event.split(' ');
                var listenTo = (segs.length > 1) ? this[segs[1]] : this;
                func = isFunction(func) ? func : this[func];
                if (listenTo) {
                    this.stopListening(listenTo, segs[0], func);
                    this.listenTo(listenTo, segs[0], func);
                }
            }, this);
            return this;
        }
function ( events ) { events = events || result ( this , 'viewEvents' ) ; each ( events , function ( func , event ) { var segs = event . split ( ' ' ) ; var listenTo = ( segs . length > 1 ) ? this [ segs [ 1 ] ] : this ; func = isFunction ( func ) ? func : this [ func ] ; if ( listenTo ) { this . stopListening ( listenTo , segs [ 0 ] , func ) ; this . listenTo ( listenTo , segs [ 0 ] , func ) ; } } , this ) ; return this ; }
Like delegateEvents, except that instead of events being bound to el, the
events are backbone events bound to the view object itself. You can create
a 'viewEvents' object literal property on a View's prototype, and when it's
instantiated, the view will listen for events on a Backone object based on
the key.

For example { 'change model': 'render' } would listen for a 'change'
event on the view's model property and then call view's render method.
If you only specify an event name and leave the property out of the key,
then the event will be bound to the view instance directly. For example,
{ 'submit' : 'render' } would call the render method of the view when
a 'submit' event occurs on the view.
@memberOf Backbone.BaseView#
return {Backbone.BaseView}
Like delegateEvents except that instead of events being bound to el the events are backbone events bound to the view object itself . You can create a viewEvents object literal property on a View s prototype and when it s instantiated the view will listen for events on a Backone object based on the key .