demo/amd/rjs/output/unified/marionette-build.js
function(child, EmptyView) {
      // Only trigger attach if already shown, attached, and not buffering, otherwise endBuffer() or
      // Region#show() handles this.
      var canTriggerAttach = this._isShown && !this.isBuffering && Marionette.isNodeAttached(this.el);
      var nestedViews;
  
      // get the emptyViewOptions, falling back to childViewOptions
      var emptyViewOptions = this.getOption('emptyViewOptions') ||
                            this.getOption('childViewOptions');
  
      if (_.isFunction(emptyViewOptions)) {
        emptyViewOptions = emptyViewOptions.call(this, child, this._emptyViewIndex);
      }
  
      // build the empty view
      var view = this.buildChildView(child, EmptyView, emptyViewOptions);
  
      view._parent = this;
  
      // Proxy emptyView events
      this.proxyChildEvents(view);
  
      view.once('render', function() {
        // trigger the 'before:show' event on `view` if the collection view has already been shown
        if (this._isShown) {
          Marionette.triggerMethodOn(view, 'before:show', view);
        }
  
        // Trigger `before:attach` following `render` to avoid adding logic and event triggers
        // to public method `renderChildView()`.
        if (canTriggerAttach && this._triggerBeforeAttach) {
          nestedViews = this._getViewAndNested(view);
          this._triggerMethodMany(nestedViews, this, 'before:attach');
        }
      }, this);
  
      // Store the `emptyView` like a `childView` so we can properly remove and/or close it later
      this.children.add(view);
      this.renderChildView(view, this._emptyViewIndex);
  
      // Trigger `attach`
      if (canTriggerAttach && this._triggerAttach) {
        nestedViews = this._getViewAndNested(view);
        this._triggerMethodMany(nestedViews, this, 'attach');
      }
      // call the 'show' method if the collection view has already been shown
      if (this._isShown) {
        Marionette.triggerMethodOn(view, 'show', view);
      }
    }
function(child, EmptyView) {
      // Only trigger attach if already shown, attached, and not buffering, otherwise endBuffer() or
      // Region#show() handles this.
      var canTriggerAttach = this._isShown && !this.isBuffering && Marionette.isNodeAttached(this.el);
      var nestedViews;
  
      // get the emptyViewOptions, falling back to childViewOptions
      var emptyViewOptions = this.getOption('emptyViewOptions') ||
                            this.getOption('childViewOptions');
  
      if (_.isFunction(emptyViewOptions)) {
        emptyViewOptions = emptyViewOptions.call(this, child, this._emptyViewIndex);
      }
  
      // build the empty view
      var view = this.buildChildView(child, EmptyView, emptyViewOptions);
  
      view._parent = this;
  
      // Proxy emptyView events
      this.proxyChildEvents(view);
  
      view.once('render', function() {
        // trigger the 'before:show' event on `view` if the collection view has already been shown
        if (this._isShown) {
          Marionette.triggerMethodOn(view, 'before:show', view);
        }
  
        // Trigger `before:attach` following `render` to avoid adding logic and event triggers
        // to public method `renderChildView()`.
        if (canTriggerAttach && this._triggerBeforeAttach) {
          nestedViews = this._getViewAndNested(view);
          this._triggerMethodMany(nestedViews, this, 'before:attach');
        }
      }, this);
  
      // Store the `emptyView` like a `childView` so we can properly remove and/or close it later
      this.children.add(view);
      this.renderChildView(view, this._emptyViewIndex);
  
      // Trigger `attach`
      if (canTriggerAttach && this._triggerAttach) {
        nestedViews = this._getViewAndNested(view);
        this._triggerMethodMany(nestedViews, this, 'attach');
      }
      // call the 'show' method if the collection view has already been shown
      if (this._isShown) {
        Marionette.triggerMethodOn(view, 'show', view);
      }
    }
function ( child , EmptyView ) { // Only trigger attach if already shown, attached, and not buffering, otherwise endBuffer() or // Region#show() handles this. var canTriggerAttach = this . _isShown && ! this . isBuffering && Marionette . isNodeAttached ( this . el ) ; var nestedViews ; // get the emptyViewOptions, falling back to childViewOptions var emptyViewOptions = this . getOption ( 'emptyViewOptions' ) || this . getOption ( 'childViewOptions' ) ; if ( _ . isFunction ( emptyViewOptions ) ) { emptyViewOptions = emptyViewOptions . call ( this , child , this . _emptyViewIndex ) ; } // build the empty view var view = this . buildChildView ( child , EmptyView , emptyViewOptions ) ; view . _parent = this ; // Proxy emptyView events this . proxyChildEvents ( view ) ; view . once ( 'render' , function ( ) { // trigger the 'before:show' event on `view` if the collection view has already been shown if ( this . _isShown ) { Marionette . triggerMethodOn ( view , 'before:show' , view ) ; } // Trigger `before:attach` following `render` to avoid adding logic and event triggers // to public method `renderChildView()`. if ( canTriggerAttach && this . _triggerBeforeAttach ) { nestedViews = this . _getViewAndNested ( view ) ; this . _triggerMethodMany ( nestedViews , this , 'before:attach' ) ; } } , this ) ; // Store the `emptyView` like a `childView` so we can properly remove and/or close it later this . children . add ( view ) ; this . renderChildView ( view , this . _emptyViewIndex ) ; // Trigger `attach` if ( canTriggerAttach && this . _triggerAttach ) { nestedViews = this . _getViewAndNested ( view ) ; this . _triggerMethodMany ( nestedViews , this , 'attach' ) ; } // call the 'show' method if the collection view has already been shown if ( this . _isShown ) { Marionette . triggerMethodOn ( view , 'show' , view ) ; } }
Render and show the emptyView. Similar to addChild method but "add:child" events are not fired, and the event from emptyView are not forwarded
Render and show the emptyView . Similar to addChild method but add : child events are not fired and the event from emptyView are not forwarded