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

When using Socket.io-client, Node JS express, and Webpack I am getting "require is not defined" error in the browser

I have an Node JS Express Application running. I am trying to integrate Socket.io with the server to connect to it on the Client. My server.ts file: import express from "express"; import { createServer } from "http"; import { listen } from…
Zack Arnett
  • 239
  • 2
  • 6
  • 19
0
votes
1 answer

Angular application (v8) not working with web component polyfills in IE11

Im trying to use the web component polyfills in an Angular (v8) application, it does not seem to be working in IE11. I have created a very basic repository that will produce the issue. The repository is of a brand new Angular application (from…
Nathan
  • 111
  • 1
  • 6
0
votes
2 answers

how to Implement lit-element-bootstrap package in lit-lement

I would like to implement lit-element-bootstrap package in lit-element. I am getting following error in console, Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced…
Senthil
  • 961
  • 1
  • 8
  • 21
0
votes
6 answers

How to pass array value to function javascript

I would like to know how to pass value in array to the ajax function in javascript. For each id, call the function in javascript. How to pass each id in array and call the function var listid=["fund","trans","ins"]; getData(id){ var li = $.ajax({ …
Senthil
  • 961
  • 1
  • 8
  • 21
0
votes
4 answers

How to get the object and display in html javascript

I would like to know how to iterate over object array in javascript. I have an array sample in which property options should be displayed in lit-HTML for every object var sample = [{ "trans": [{ "id": "trans", "fee": 20, "options":…
Senthil
  • 961
  • 1
  • 8
  • 21
0
votes
1 answer

lit-element styles within html template versus static styles getter?

given the following code, and the lit-html vscode extension, syntax highlighting doesn't work on the static styles getter class MyComponent extends LitElement { // SYNTAX HIGHLIGHTING FAILS static get styles() { return css` * {} …
ChaseMoskal
  • 7,151
  • 5
  • 37
  • 50
0
votes
1 answer

Service Worker generated by polymer does not work when i override the host in polymer serve or if i use HTTPS protocol

I am new to polymer and I am trying to build a PWA application. I followed their starter kit which can be viewed here. But I cant make the generated service-worker.js work when i pass -P https or -H 192.168.10.98 on polymer serve command. Although…
0
votes
0 answers

using bootstrap modals with lit-element / web-components

i'm trying to use the modal from bootstrap in my lit-element project. im using sass to load the bootstrap .scss files seperately. but it doesnt really show the modal on button-click at all. i tried so much, but it doesnt work at…
0
votes
1 answer

bundle size: Is it possible to set lit-element as a peer dependency?

I noticed there is much code added to the bundled js for a simple lit-element based web component, and react components set react as a peer dependency so only one react runtime is bundled, since web components are framework-agnostic, if i used…
Edderd
  • 85
  • 6
0
votes
3 answers

Multiple Radio Button checked, unchecks Radio Button group

I would like to know when radio button is checked , it unchecks other object radio button. I have a object and for each object options, radio button is created. For example, for id=SG two radio buttons are created, if no checked, set bank as default…
mia
  • 235
  • 1
  • 4
  • 17
0
votes
1 answer

how to implement select2 in litelement

I would like to know how to implement select2 dropdown with images in litelement. since i have dynamic option values , how to implement select with option textbox and flags in litelement I have mentioned below sourcecode , please know how to do…
mia
  • 235
  • 1
  • 4
  • 17
0
votes
1 answer

Issue with Custom Component

I am working on learning lit-element, lit-html. The Component that I am trying to create is a custom select component. I am having an issue populating the drop down values and options. I am seeking guidance on what I should do next of to see if I am…
DRW
  • 335
  • 1
  • 3
  • 17
0
votes
1 answer

LitElement : Not working in a modified Firefox version

I'm trying to integrate LitElement in a project for work. It works on all browsers, except on a modified Firefox which has customElements disabled. Is there any way to get around this? If I turn in on in about:config Asking users to activate it is…
Ciprian
  • 3,066
  • 9
  • 62
  • 98
0
votes
1 answer

Should ("...") be used in templates?

In lit-element @ Templates @ Bind properties to child elements (documentation) for Attribute:

Boolean attribute: ?checked="${...}" Property: .value="${...}" Event handler: @event="${...}" a pair of " is always used. On the…
SONewbiee
  • 363
  • 2
  • 15
0
votes
2 answers

JavaScript import for lit-element gives me 404 not found error in browser

I have installed lit-element via npm in ASP.NET MVC 5 solution. I am trying to create a starter tag as described in https://lit-element.polymer-project.org/guide/start guide. In browser, I get "GET…
pranavn
  • 211
  • 3
  • 10