js/component.js
function(child) {
        this._validateChild(child);
        if (child.parent) {
            child.parent.remove(child);
        }
        child.parent = this;
        this._children.push(child);
        this.root.appendChild(child.root);
        if (this.__fastinject__) {
            this.__fastinject__(child);
        } // otherwise it will be injected when __fastinject__ is set
    }
function(child) {
        this._validateChild(child);
        if (child.parent) {
            child.parent.remove(child);
        }
        child.parent = this;
        this._children.push(child);
        this.root.appendChild(child.root);
        if (this.__fastinject__) {
            this.__fastinject__(child);
        } // otherwise it will be injected when __fastinject__ is set
    }
function ( child ) { this . _validateChild ( child ) ; if ( child . parent ) { child . parent . remove ( child ) ; } child . parent = this ; this . _children . push ( child ) ; this . root . appendChild ( child . root ) ; if ( this . __fastinject__ ) { this . __fastinject__ ( child ) ; } // otherwise it will be injected when __fastinject__ is set }
Add a child component
@param {Component} child
Add a child component