web-component 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

3

Solved

I have defined a custom element and I want to execute a script only when the custom element is upgraded to its registered type. The use case is that I must call a custom method. My main html file ...

3

I would like to use the CSS framework Bulma with LitElement. I know I can use an External Stylesheet However, they state it is bad practice to do it this way. I also have the problem that I had to ...
Hahn asked 6/1, 2020 at 21:6

2

Solved

I'm working with a project that uses React and Typescript, but I want to start using native web components in my project to phase out some of my React components. I'm getting this error when I try...

11

Solved

I'm actually migrating to Angular 15 and saw that swiper 9 was out. It's written that a simple npm i swiper and that it should work, since Custom elements are supported in all major browser and by...
Humphreys asked 2/2, 2023 at 16:50

2

I'm creating a Vue web component using vue-cli 4.5.13 and the --target wc option. I also need the component to use the vue-i18n-next plugin (last version for vue 3 projects), which requires some op...
Listerism asked 18/8, 2021 at 14:10

4

i am trying to build web components from react components, it is all working fine, but there are two problems i am trying to solve: Is there a way to convert such web components to pure web compon...
Belia asked 6/4, 2021 at 14:42

3

Solved

Say I have a native web component, and it has a slot: <slot id="CONTENT_SLOT" name="content"></slot> const CONTENT_SLOT = this.shadowRoot.getElementById("CONT...
Weywadt asked 12/4, 2022 at 15:30

4

Solved

I would like to make use of Lit-Element with Bootstrap. Currently I have simply imported the external dependancies as suggested here: https://lit-element.polymer-project.org/guide/styles#external...
Arabela asked 28/3, 2019 at 14:33

4

I'm trying to find a way to encapsulate Javascript without using iframes. Ideally, I'd like a way to load external HTML components (widgets) on a parent page, without the two-step loading process, ...
Inchworm asked 14/2, 2015 at 16:4

2

Solved

since I updated Angular to version 17 I can't create web components.. I used to do it in app.module, where are they created now? I tried in app.component as the guide says but it doesn't seem to wo...

1

Solved

I have a project that has some script to build typescript web-component in it (here). I use rollup and typescript to build my web-components and my web-component file is like this: import HTML from...

10

Solved

Is there a way to change styles found in a shadow element? Specifically, extend/overwrite some properties found in a css class? I am using a chrome-extension called Beanote which hasn't been update...
Waldman asked 4/12, 2017 at 0:49

5

Solved

I have created a web component and I referenced image from my asset folder in there as below <img src="./assets/bot.png" alt="{{botTitle}}" /> on local everything is fine, I published m...
Rosewater asked 6/10, 2018 at 21:10

8

Solved

What is the canonical way to import styles into a web component? The following gives me an error HTML element <link> is ignored in shadow tree: <template> <link rel="style" href="...
Zagreus asked 22/2, 2015 at 22:41

7

Shadow dom encapsulate css styles, selectors don't cross the shadow boundary. Question: How to use global common css styles in shadow dom? (suppose there are some common css styles which will be ...
Occlusion asked 29/2, 2016 at 7:49

4

Solved

I need get elements from Shadow DOM and change it. How i can do it? <div> <input type="range" min="100 $" max="3000 $"> </div>
Badinage asked 1/8, 2016 at 14:45

3

I'm trying to use vanilla javascript to build a custom component which observes changes in all data attributes, e.g.: class MyComponent extends HTMLElement { static get observedAttributes () { r...
Beget asked 21/7, 2021 at 3:52

1

I'd like to export some of the components I use in my vue projects as web-component in order to be able to use them on other non-vue projects. I see that vue has support for this, and it exports we...
Neuburger asked 25/1, 2023 at 16:54

5

Solved

I have been trying to add image in react. I'm not using webpack, I'm using parceljs. Also using typescript I have try: import image from path/to/image.png <img src={image} /> inside react c...
Spew asked 16/10, 2018 at 18:22

2

Solved

Anchor elements (<a>) are created when the user interacts with a web component. The problem is, that I cannot get the anchor element returned from the "outside" of the web component...
Mosque asked 16/9, 2019 at 19:31

2

I'm working with lit-elements via @open-wc and is currently trying to write a nested set of components where the inner component is an input field and some ancestor component has to support some ar...
Phosphorylase asked 20/11, 2019 at 20:1

2

Does anybody know how to use :host (or :host()) with :has() ? For example something like this: :host:has([disabled]) { opacity: 0.75; } or :host(:has([disabled])) { opacity: 0.75; } With the sy...
Inexorable asked 29/11, 2022 at 12:48

3

Our platform is built on a micro-frontend architecture with web components. We are using Stencil for some of them, this means we have multiple Stencil apps within one web page. Additionally, we hav...
Bolometer asked 13/1, 2020 at 8:22

2

Solved

What is the current best practice to set global/reset CSS if I'm using Lit-element? I have tried 1) Inline them in <style> in my document root, 2) Construction stylesheet like this answer ...
Fiorenza asked 29/8, 2019 at 9:10

© 2022 - 2024 — McMap. All rights reserved.