function(child, element, root) {
        this._children.push(child);
        (root || this.root).insertBefore(child.root, element);
        (root || this.root).removeChild(element);
    }
function(child, element, root) {
        this._children.push(child);
        (root || this.root).insertBefore(child.root, element);
        (root || this.root).removeChild(element);
    }
function ( child , element , root ) { this . _children . push ( child ) ; ( root || this . root ) . insertBefore ( child . root , element ) ; ( root || this . root ) . removeChild ( element ) ; }
Attaches a component by replacing the provided element. Element must be an element inside the parent component.
@param {Component} child
@param {Element} element
@param {HTMLElement} root if different than child.root
Attaches a component by replacing the provided element . Element must be an element inside the parent component .