render(container, template, options = {}) {
    var fragment = document.createElement(container.tagName);

    fragment.innerHTML = template;

    if (fragment.children.length > 1) {
      throw new Error('The template can only have one root element');
    }

    this.element = fragment.firstElementChild;

    if (options.replaceContainer) {
      container.parentNode.replaceChild(fragment.firstElementChild, container);
    } else {
      container.appendChild(fragment.firstElementChild);
    }
  }
/**
   * Renders the given template on the specified container element
   *
   * @param {HTMLElement} container The container element
   * @param {string} template The HTML to be rendered
   */
Renders the given template on the specified container element
@param {HTMLElement} container The container element
@param {string} template The HTML to be rendered
Renders the given template on the specified container element @param { HTMLElement } container The container element @param { string } template The HTML to be rendered
render(container, template, options = {}) {
    var fragment = document.createElement(container.tagName);
    fragment.innerHTML = template;
    if (fragment.children.length > 1) {
      throw new Error('The template can only have one root element');
    }
    this.element = fragment.firstElementChild;
    if (options.replaceContainer) {
      container.parentNode.replaceChild(fragment.firstElementChild, container);
    } else {
      container.appendChild(fragment.firstElementChild);
    }
  }
render ( container , template , options = { } ) { var fragment = document . createElement ( container . tagName ) ; fragment . innerHTML = template ; if ( fragment . children . length > 1 ) { throw new Error ( 'The template can only have one root element' ) ; } this . element = fragment . firstElementChild ; if ( options . replaceContainer ) { container . parentNode . replaceChild ( fragment . firstElementChild , container ) ; } else { container . appendChild ( fragment . firstElementChild ) ; } }
Renders the given template on the specified container element
 @param {HTMLElement} container The container element
 @param {string} template The HTML to be rendered
Renders the given template on the specified container element @param { HTMLElement } container The container element @param { string } template The HTML to be rendered