Questions tagged [lit-element]

A base class for creating custom elements with the Lit JS library.

LitElement makes it easy to define web components using /Lit. LitElement allows you to declare reactive properties that re-render the component and reflect to attributes.

It uses to render DOM.

677 questions
0
votes
1 answer

Using @Polymer/app-storage with lit-element

I want to use indexedDB with lit-element. To do so, I imported @polymer/app-storage/app-indexeddb-mirror in my lit-element project. A copy of my code is here. The value in the data attribute is not saved to indexedDB. No error is thrown. Is there…
MadeInLagny
  • 185
  • 1
  • 12
0
votes
2 answers

Passing multiple duplicate properties in multiple LitElement

One can pass down properties to another LitElement this way: myRender(myParameter) { return html` `; } I have dozens of properties that I need to pass to multiple…
user7331530
  • 815
  • 1
  • 12
  • 21
0
votes
1 answer

I get errors serving lit-element with the nollup development server

When serving lit-element components with nollup then I keep getting the following error in the browser console that I am not able to track down: toast-messages.js:56 Uncaught TypeError: modules[number] is not a function at create_bindings…
markop
  • 186
  • 11
0
votes
0 answers

Polymer 3 - missing decorators

I miss a lot of handy decorators in LitElement and I am unable to find them in the documentation. Can they be added or what is the deal here? For example: https://stenciljs.com/docs/events They have a lot of nice decorators. It feels to me that…
user11137806
0
votes
1 answer

gitlab error in testing a lit-element app

I'm using Gitlab as a CI/CD tool for my project and, I'm having this error trying to run the tests: > pwa-starter-kit@0.9.0 test:unit /builds/jperera84/prop-mgm-app > polymer test --module-resolution=node --npm Error: No browsers configured to…
Jose Raul Perera
  • 778
  • 1
  • 7
  • 35
0
votes
1 answer

webpack index.js simple-wc-router setup

Best way to setup a SPA router with lit-element and simple-wc-router using webpack. I currently have this working but am wondering if there is a better way to put this all together. webpack-config.js: module.exports = ({ mode, presets }) => { …
0
votes
1 answer

Import bootstrap.js into lit-element component

I have a lit-element component that renders the bootstrap dropdown correctly, however when clicking on the dropdown, the menu does not appear. I realize that this is a javascript problem, however I am unclear how to resolve the issue. I am importing…
Paul Mazzuca
  • 567
  • 1
  • 5
  • 19
0
votes
1 answer

Bootstrap and LitElement

I'm trying to use Bootstrap in a LitElement component. I included all the boostrap assets. Theoretically, it should work. I'm wondering why it doesn't (the button doesn't open the card). class myShadowModule extends LitElement{ constructor(){ …
alfredopacino
  • 2,979
  • 9
  • 42
  • 68
0
votes
1 answer

Polymer and LitElement coexistence

Is there a way I can make Polymer WebComponents and LitElements coexist? It should be doable in theory, but afaik you cannot import html in LitElements, so it is actually infeasible. This issue try to address the problem…
alfredopacino
  • 2,979
  • 9
  • 42
  • 68
0
votes
1 answer

Polymer lit-element web components not working in IE

I have create custom web component using Lit-Element and it is working fine with Chrome, Firefox, Eadge, Opera but only not working in IE 11. I also tried to compile it into es5 but still no luck. Error in IE console: Webpack rule: module: { …
0
votes
2 answers

Golang and JavaScript modules

I want to use Polymer LitElement with a Go backend. With LitElement I implement the web components in JavaScript modules! For routing on the server-side I use Gorilla Mux like this mux :=…
NicolasR
  • 2,222
  • 3
  • 23
  • 38
0
votes
1 answer

How did I populate vaadin-grid with fetch?

I am using lit-element and vaadin-grid to make a table. it is very similar to this example. https://stackblitz.com/edit/grid-renderers?file=grid-demo.js However, it keeps telling me I have a syntax error I can not figure out why. I can see the…
Ben-Coden
  • 126
  • 1
  • 14
0
votes
1 answer

Viewing the value of an element in litElement

I have a very simple element that wrap an element. Coming from Polymer, I am having a bit of a hard time adjusting. I want to display the value of the range. This is what I came up with: import { LitElement, html } from…
Merc
  • 16,277
  • 18
  • 79
  • 122
0
votes
1 answer

How to share 1 instance of lit-element across many web components

I have many web components (each in its own repo) and would like to share one instance of lit-element/lit-html across them all. The idea is to reduce bundle size. I do not want a separate instance in each bundle I made a Webpack UMD library of…
Maurice
  • 109
  • 1
  • 7
0
votes
2 answers

ternary code to change checkbox in template string in Javascript

I'm working with polymer and lit-element. In the render function I have a template string as follow: render() { this.todoItem = JSON.parse(this.todoItem); return html`
  • ${this.todoItem.item}
    Patricio Vargas
    • 5,236
    • 11
    • 49
    • 100