def replaceElement(self, element, widget):
        DOM.getParent(element).replaceChild(widget.getElement(), element)
        self.adopt(widget, None)
        self.children.append(widget)
Replace an existing element with the given widget.
dataset/ETHPy150Open anandology/pyjamas/addons/TemplatePanel.py/TemplatePanel.replaceElement