src/conbo/binding/BindingUtils.js
function(rootView, namespace, type)
		{
			type || (type = 'view');
			
			if (['view', 'glimpse'].indexOf(type) == -1)
			{
				throw new Error(type+' is not a valid type parameter for applyView');
			}
			
			var typeClass = conbo[type.charAt(0).toUpperCase()+type.slice(1)],
				scope = this
				;
			
			var rootEl = conbo.isElement(rootView) ? rootView : rootView.el;
			
			for (var className in namespace)
			{
				var classReference = scope.getClass(className, namespace);
				var isView = conbo.isClass(classReference, conbo.View);
				var isGlimpse = conbo.isClass(classReference, conbo.Glimpse) && !isView;
				
				if ((type == 'glimpse' && isGlimpse) || (type == 'view' && isView))
				{
					var tagName = conbo.toKebabCase(className);
					var nodes = conbo.toArray(rootEl.querySelectorAll(tagName+':not(.cb-'+type+'):not([cb-repeat]), [cb-'+type+'='+className+']:not(.cb-'+type+'):not([cb-repeat])'));
					
					nodes.forEach(function(el)
					{
						var ep = __ep(el);

						// Ignore anything that's inside a cb-repeat
						if (!ep.closest('[cb-repeat]'))
						{
							var closestView = ep.closest('.cb-view');
							var context = closestView ? closestView.cbView.subcontext : rootView.subcontext;
							
							new classReference({el:el, context:context});
						}
					});
				}
			}
			
			return this;
		}
function(rootView, namespace, type)
		{
			type || (type = 'view');
			
			if (['view', 'glimpse'].indexOf(type) == -1)
			{
				throw new Error(type+' is not a valid type parameter for applyView');
			}
			
			var typeClass = conbo[type.charAt(0).toUpperCase()+type.slice(1)],
				scope = this
				;
			
			var rootEl = conbo.isElement(rootView) ? rootView : rootView.el;
			
			for (var className in namespace)
			{
				var classReference = scope.getClass(className, namespace);
				var isView = conbo.isClass(classReference, conbo.View);
				var isGlimpse = conbo.isClass(classReference, conbo.Glimpse) && !isView;
				
				if ((type == 'glimpse' && isGlimpse) || (type == 'view' && isView))
				{
					var tagName = conbo.toKebabCase(className);
					var nodes = conbo.toArray(rootEl.querySelectorAll(tagName+':not(.cb-'+type+'):not([cb-repeat]), [cb-'+type+'='+className+']:not(.cb-'+type+'):not([cb-repeat])'));
					
					nodes.forEach(function(el)
					{
						var ep = __ep(el);

						// Ignore anything that's inside a cb-repeat
						if (!ep.closest('[cb-repeat]'))
						{
							var closestView = ep.closest('.cb-view');
							var context = closestView ? closestView.cbView.subcontext : rootView.subcontext;
							
							new classReference({el:el, context:context});
						}
					});
				}
			}
			
			return this;
		}
function ( rootView , namespace , type ) { type || ( type = 'view' ) ; if ( [ 'view' , 'glimpse' ] . indexOf ( type ) == - 1 ) { throw new Error ( type + ' is not a valid type parameter for applyView' ) ; } var typeClass = conbo [ type . charAt ( 0 ) . toUpperCase ( ) + type . slice ( 1 ) ] , scope = this ; var rootEl = conbo . isElement ( rootView ) ? rootView : rootView . el ; for ( var className in namespace ) { var classReference = scope . getClass ( className , namespace ) ; var isView = conbo . isClass ( classReference , conbo . View ) ; var isGlimpse = conbo . isClass ( classReference , conbo . Glimpse ) && ! isView ; if ( ( type == 'glimpse' && isGlimpse ) || ( type == 'view' && isView ) ) { var tagName = conbo . toKebabCase ( className ) ; var nodes = conbo . toArray ( rootEl . querySelectorAll ( tagName + ':not(.cb-' + type + '):not([cb-repeat]), [cb-' + type + '=' + className + ']:not(.cb-' + type + '):not([cb-repeat])' ) ) ; nodes . forEach ( function ( el ) { var ep = __ep ( el ) ; // Ignore anything that's inside a cb-repeat
 if ( ! ep . closest ( '[cb-repeat]' ) ) { var closestView = ep . closest ( '.cb-view' ) ; var context = closestView ? closestView . cbView . subcontext : rootView . subcontext ; new classReference ( { el : el , context : context } ) ; } } ) ; } } return this ; }
Applies View and Glimpse classes DOM elements based on their cb-view
attribute or tag name

@param	{HTMLElement} 			rootView - DOM element, View or Application class instance
@param	{conbo.Namespace} 		namespace - The current namespace
@param	{string} 				[type=view] - View type, 'view' or 'glimpse'
@returns	{conbo.BindingUtils}	A reference to this object
Applies View and Glimpse classes DOM elements based on their cb - view attribute or tag name