lit-html Questions
2
I am building a desktop app that monitors some things and generates data about what it is monitoring. When the user wants to interact with the data the app starts a very simple web server. The serv...
Forwhy asked 1/8, 2021 at 22:21
4
I am newbie to lit-element, and when use import to include the library, I am getting error as:
Uncaught TypeError: Failed to resolve module specifier "lit-element".
Relative references must st...
Italianize asked 8/6, 2019 at 14:51
3
Solved
Can anyone tell me why I cannot use variables within lit-html's html method?
const h1 = 'h1';
return html`
<${h1} class="a-heading ${classes}">
<slot></slot>
</${h1}>
`;...
Magness asked 9/1, 2020 at 14:49
5
Solved
Does lit-html have by any change something like React's ref feature?
For example in the following pseudo-code inputRef would be a callback function or an object { current: ... } where lit-html coul...
Fiore asked 26/11, 2019 at 2:11
2
Solved
In lit/lit-html/lit-element, a standard component is the TemplateResult (usually HTMLTemplateResult), created like:
function renderMe(msg) {
return html`<div>Hello ${msg}!</div>`;
}
a...
2
Trying to create some reusable components for our Electron screen using lit-html. When I attempt to add an example component I run into an error.
Using electron: ^5.0.6
Trying to import module m...
Dominquedominquez asked 8/8, 2019 at 16:22
2
Thank you for reading.
I am new to polymer/lit-element,lit-html. I have started with the PWA starter kit. And at my surprise it doesn't use polymer elements but lit-elements.
I have tried to app...
Handle asked 30/3, 2019 at 23:56
2
Solved
I have been learning Polymer and this came in - The future of web (lit-element & lit-html)
I understood that lit-html is for HTML templating with a couple of efficient techniques.
At the same t...
Cormorant asked 16/6, 2020 at 16:20
1
Solved
I use typescript to write a simple demo with lit-html:
import {html, TemplateResult} from 'lit-html';
export default function sayHello(name: string): TemplateResult {
return html`<h1>Hello...
Queri asked 4/6, 2020 at 17:20
2
Solved
Summary
I'm looking at TODO MVC Example with shadow DOM and customElements and in litRender.js there's a weird code in invalidate() function:'await 0'. I want to know what's the purpose of this co...
Fellatio asked 22/12, 2018 at 13:37
1
Solved
I am using polymer 3 and lit-element(2.2.1). The version of mwc-textfield is 0.13.0. I have read the documentations related to this version.In this documentation, I have found that we can add mixin...
Fortdefrance asked 29/2, 2020 at 13:46
2
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 ...
Chuddar asked 31/5, 2019 at 2:46
1
Solved
<example name="One"></example>
<example name="Two"></example>
<example name="Three"></example>
Next render looks like this:
<example name="Four"></ex...
Geraldina asked 5/2, 2020 at 10:23
1
Solved
Question is pretty much self-explanatory.
Example:
function generateTemplate(tag) {
return html`
<${tag}
.some-prop=${1}
>
...
</${tag}>
`;
}
Polyphyletic asked 10/12, 2019 at 2:36
2
I would like to know how to implement bootstrap navbar in lit-element/lit-html
I have created navbar component in lit-element but navbar dropdown and toggling are not working.
I have to implement...
Haro asked 30/5, 2019 at 10:31
1
Solved
In lit-html we have the firstUpdated() method to run one-time initialisations once an element is rendered.
What if you need to run a function only once all children within that template are update...
Plasia asked 20/9, 2019 at 23:8
2
I've created a custom select-component with LitElement:
import { LitElement, html } from 'lit-element';
class CustomSelect extends LitElement {
static get properties() {
return {
options: { ty...
Publus asked 25/4, 2019 at 21:45
1
I started trying out lit-html and lit-elements, playing around with it and now I git in the problem where I cannot find out how to publish such code online. Never worked with Node-js packages on on...
Cotterell asked 29/8, 2019 at 18:57
1
I can not understand what it exactly does according to the documentation.
This documentation is not detailed enough.
Is there an example?
Lenity asked 26/8, 2019 at 8:50
1
<div @click=${this.click_cb.bind(this, record)}>${record.msg}<div>
Is this the correct way to pass an argument to a listener?
Yaws asked 21/8, 2019 at 6:44
1
In lit-element, in most of the cases passing data from parent-component to child-component via attributes and via properties result in the same thing.
I wonder in which case I should use attribute...
Saxton asked 19/8, 2019 at 8:34
1
I'm working on a lit-element project, and I got a problem that reset.css cannot be applied to web components wrapped with shadow-root
I've tried this way, and I got this following error.
Refused ...
Ouphe asked 2/8, 2019 at 11:41
1
Solved
I have a simple check list with a delete button for each item. When I check the first item and then delete it, the list updates, deleting the item, but the check box of the next item is checked. Th...
Believe asked 3/5, 2019 at 1:36
1
Solved
I'm not talking about boolean attributes, attributes like class if you don't want to add an empty class attribute if there's no CSS class.
html`<span class=${hasClass ? 'my-class' : ''}><...
Doha asked 30/4, 2019 at 1:56
1
Question: Is there a way to propagate a property change to a child element without triggering its render function? Currently when I update the property in parent's switchViewModeHandler it triggers...
Luff asked 14/3, 2019 at 21:22
1 Next >
© 2022 - 2024 — McMap. All rights reserved.