nl_tokens: Function : render Overwrites the default Backbone . View . render method . It automatically invokes renderView and <renderSubviews > .
pl_tokens: function render ( ) { debug ( 'render `%s`' , this . toString ( ) ) ; var self = this ; function invokeBeforeRender ( ) { debug ( 'invoke before render `%s`' , self . toString ( ) ) ; var deferBeforeRender = Q . defer ( ) , resolve = deferBeforeRender . resolve , reject = deferBeforeRender . reject ; if ( ! _ . isUndefined ( self . beforeRender ) ) { self . beforeRender ( resolve , reject ) ; } else { resolve ( ) ; } return deferBeforeRender . promise ; } function invokeRender ( ) { debug ( 'invoke render `%s`' , self . toString ( ) ) ; if ( ! _ . isUndefined ( self . renderView ) ) { self . renderView ( ) ; } } function invokeAfterRender ( ) { debug ( 'invoke after render `%s`' , <mask> . toString ( ) ) ; var deferAfterRender = Q . defer ( ) , resolve = deferAfterRender . resolve , reject = deferAfterRender . reject ; if ( ! _ . isUndefined ( self . afterRender ) ) { self . afterRender ( resolve , reject ) ; } else { resolve ( ) ; } return deferAfterRender . promise ; } return invokeBeforeRender ( ) . then ( invokeRender ) . then ( invokeAfterRender ) . then ( self . renderSubviews . bind ( self ) ) ; }