How to use the lit-html/lib/lit-extended.render function in lit-html

To help you get started, we’ve selected a few lit-html examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github richardanaya / webcompose / webcompose.js View on Github external
$renderProps(){
    if(this.$lifecycle && this.$lifecycle.prerender){
      this.$lifecycle.prerender.call(this,this.$props);
    }
    var fragments = this.$render(this.$props);
    render(fragments,this.$shadow)
    if(this.$lifecycle && this.$lifecycle.postrender){
      this.$lifecycle.postrender.call(this,this.$props);
    }
  }
}
github QuinntyneBrown / simple-custom-element / src / simple.component.ts View on Github external
connectedCallback() {    
        if (!this.shadowRoot) this.attachShadow({ mode: 'open' });
  
        if (!this.hasAttribute('role'))
            this.setAttribute('role', 'simple');

        if (!this.hasAttribute('tabindex'))
            this.setAttribute('tabindex', '0');

        render(this.template, this.shadowRoot)    
    }
github kepta / idly / packages / idly-gl / src / Map / index.ts View on Github external
protected putPopup() {
    if (this.popup) {
      this.popup.remove();
      this.popup = undefined;
    }

    if (!this.props.popup) {
      return;
    }
    const latlong = [this.props.popup.lnglat.lng, this.props.popup.lnglat.lat];
    const el = document.createElement('div');
    el.classList.add('idly-gl');
    render(SelectorPopup(this.props.popup.ids, this.props.actions), el);
    this.popup = new Popup()
      .setLngLat(latlong)
      .setDOMContent(el)
      .addTo(this.gl);
  }
github frame00 / oo-elements / src / elements / oo-element.ts View on Github external
private _render(template: TemplateResult) {
		render(template, this.shadowRoot || this.attachShadow({ mode: 'open' }))
		this.renderedCallback()
	}