src/view.js
function (childView, el) {
				if (RUNTIME_CHECKS) {
					if (!(childView instanceof View)) {
						throw '"childView" argument must be a BFF View';
					}
					if (arguments.length > 1 && !(el === false || el instanceof HTMLElement)) {
						throw '"el" argument must be an HTMLElement or the boolean value false';
					}
				}

				this.__private.childViews.push(childView);
				el !== false && (el || this.el).appendChild(childView.el);
				return childView;
			}
function (childView, el) {
				if (RUNTIME_CHECKS) {
					if (!(childView instanceof View)) {
						throw '"childView" argument must be a BFF View';
					}
					if (arguments.length > 1 && !(el === false || el instanceof HTMLElement)) {
						throw '"el" argument must be an HTMLElement or the boolean value false';
					}
				}

				this.__private.childViews.push(childView);
				el !== false && (el || this.el).appendChild(childView.el);
				return childView;
			}
function ( childView , el ) { if ( RUNTIME_CHECKS ) { if ( ! ( childView instanceof View ) ) { throw '"childView" argument must be a BFF View' ; } if ( arguments . length > 1 && ! ( el === false || el instanceof HTMLElement ) ) { throw '"el" argument must be an HTMLElement or the boolean value false' ; } } this . __private . childViews . push ( childView ) ; el !== false && ( el || this . el ) . appendChild ( childView . el ) ; return childView ; }
Adds another view as a child to the view. A child view will be automatically added to this view's root element and destroyed whenever its parent view is destroyed.
@instance
@arg {module:bff/view} childView - The view that will be added to the list of this view's children.
@arg {HTMLElement|boolean} [optional] - An element to which the child view's root element will be appended. If not specified, it will be appended to this view's root element. Can also be `false`, in which case the child view will not be appended to anything.
Adds another view as a child to the view . A child view will be automatically added to this view s root element and destroyed whenever its parent view is destroyed .