src/marionette.component.js
function(region) {
    if (this._isShown) {
      throw new Error('This component is already shown in a region.');
    }

    if (!region) {
      throw new Error('Please supply a region to show inside.');
    }

    this.region = region;

    this.triggerMethod('before:show');

    this._showView();
    this._isShown = true;

    this.triggerMethod('show');
  }
function(region) {
    if (this._isShown) {
      throw new Error('This component is already shown in a region.');
    }

    if (!region) {
      throw new Error('Please supply a region to show inside.');
    }

    this.region = region;

    this.triggerMethod('before:show');

    this._showView();
    this._isShown = true;

    this.triggerMethod('show');
  }
function ( region ) { if ( this . _isShown ) { throw new Error ( 'This component is already shown in a region.' ) ; } if ( ! region ) { throw new Error ( 'Please supply a region to show inside.' ) ; } this . region = region ; this . triggerMethod ( 'before:show' ) ; this . _showView ( ) ; this . _isShown = true ; this . triggerMethod ( 'show' ) ; }
Show this component inside a region
Show this component inside a region