render() {
    let template;
    if (!this.__children) {
      template = /** @type {HTMLTemplateElement} */(template || this.querySelector('template'));
      if (!template) {
        // Wait until childList changes and template should be there by then
        let observer = new MutationObserver(() => {
          template = /** @type {HTMLTemplateElement} */(this.querySelector('template'));
          if (template) {
            observer.disconnect();
            this.render();
          } else {
            throw new Error('dom-bind requires a <template> child');
          }
        });
        observer.observe(this, {childList: true});
        return;
      }
      this.root = this._stampTemplate(template);
      this.$ = this.root.$;
      this.__children = [];
      for (let n=this.root.firstChild; n; n=n.nextSibling) {
        this.__children[this.__children.length] = n;
      }
      this._enableProperties();
    }
    this.__insertChildren();
    this.dispatchEvent(new CustomEvent('dom-change', {
      bubbles: true,
      composed: true
    }));
  }
/**
   * Forces the element to render its content. This is typically only
   * necessary to call if HTMLImports with the async attribute are used.
   * @return {void}
   */
Forces the element to render its content. This is typically only
necessary to call if HTMLImports with the async attribute are used.
@return {void}
Forces the element to render its content . This is typically only necessary to call if HTMLImports with the async attribute are used . @return { void }
render() {
    let template;
    if (!this.__children) {
      template = (template || this.querySelector('template'));
      if (!template) {
        let observer = new MutationObserver(() => {
          template = (this.querySelector('template'));
          if (template) {
            observer.disconnect();
            this.render();
          } else {
            throw new Error('dom-bind requires a <template> child');
          }
        });
        observer.observe(this, {childList: true});
        return;
      }
      this.root = this._stampTemplate(template);
      this.$ = this.root.$;
      this.__children = [];
      for (let n=this.root.firstChild; n; n=n.nextSibling) {
        this.__children[this.__children.length] = n;
      }
      this._enableProperties();
    }
    this.__insertChildren();
    this.dispatchEvent(new CustomEvent('dom-change', {
      bubbles: true,
      composed: true
    }));
  }
render ( ) { let template ; if ( ! this . __children ) { template = ( template || this . querySelector ( 'template' ) ) ; if ( ! template ) { let observer = new MutationObserver ( ( ) => { template = ( this . querySelector ( 'template' ) ) ; if ( template ) { observer . disconnect ( ) ; this . render ( ) ; } else { throw new Error ( 'dom-bind requires a <template> child' ) ; } } ) ; observer . observe ( this , { childList : true } ) ; return ; } this . root = this . _stampTemplate ( template ) ; this . $ = this . root . $ ; this . __children = [ ] ; for ( let n = this . root . firstChild ; n ; n = n . nextSibling ) { this . __children [ this . __children . length ] = n ; } this . _enableProperties ( ) ; } this . __insertChildren ( ) ; this . dispatchEvent ( new CustomEvent ( 'dom-change' , { bubbles : true , composed : true } ) ) ; }
Forces the element to render its content.
Forces the element to render its content .
/** @type {HTMLTemplateElement} */ // Wait until childList changes and template should be there by then /** @type {HTMLTemplateElement} */