nl_tokens: Build an instance of a region by passing in a configuration object and a default region class to use if none is specified in the config . The config object should either be a string as a jQuery DOM selector a Region class directly or an object literal that specifies a selector a custom regionClass and any options to be supplied to the region : js { selector : #foo regionClass : MyCustomRegion allowMissingEl : false }
pl_tokens: function ( regionConfig , DefaultRegionClass ) { if ( _ . isString ( regionConfig ) ) { return this . _buildRegionFromSelector ( regionConfig , DefaultRegionClass ) ; } if ( regionConfig . selector || regionConfig . el || regionConfig . regionClass ) { return this . _buildRegionFromObject ( regionConfig , DefaultRegionClass ) ; } if ( _ . isFunction ( regionConfig ) ) { return this . _buildRegionFromRegionClass ( regionConfig ) ; } throw new Marionette . Error ( { <mask> : 'Improper region configuration type.' , url : 'marionette.region.html#region-configuration-types' } ) ; }