render() {
        this.prerender();

        let output = super.render();
        let element = null;

        if(output instanceof Node) {
            element = output;

        } else if(typeof output === 'string') {
            let wrapper = document.createElement('div');
            wrapper.innerHTML = output;
            element = wrapper.firstElementChild; 
        
        }

        if(this.isValid() && element) {
            this.element.parentElement.replaceChild(element, this.element); 
        }

        this.element = element;

        this.postrender();
        
        return this.element;
    }
/**
     * Renders the template
     *
     * @return {HTMLElement} Element
     */
Renders the template
@return {HTMLElement} Element
Renders the template @return { HTMLElement } Element
render() {
        this.prerender();
        let output = super.render();
        let element = null;
        if(output instanceof Node) {
            element = output;
        } else if(typeof output === 'string') {
            let wrapper = document.createElement('div');
            wrapper.innerHTML = output;
            element = wrapper.firstElementChild; 
        }
        if(this.isValid() && element) {
            this.element.parentElement.replaceChild(element, this.element); 
        }
        this.element = element;
        this.postrender();
        return this.element;
    }
render ( ) { this . prerender ( ) ; let output = super . render ( ) ; let element = null ; if ( output instanceof Node ) { element = output ; } else if ( typeof output === 'string' ) { let wrapper = document . createElement ( 'div' ) ; wrapper . innerHTML = output ; element = wrapper . firstElementChild ; } if ( this . isValid ( ) && element ) { this . element . parentElement . replaceChild ( element , this . element ) ; } this . element = element ; this . postrender ( ) ; return this . element ; }
Renders the template
 @return {HTMLElement} Element
Renders the template @return { HTMLElement } Element