by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    nithin159
    @nithin159
    Hi All

    <template id="template">
    <style>
    ...
    </style>
    <div>
    <h1>Web Components</h1>
    <img src="http://webcomponents.org/img/logo.svg">
    </div>
    </template>

    <script>
    var template = document.querySelector('#template');
    var clone = document.importNode(template.content, true);
    var host = document.querySelector('#host');
    host.appendChild(clone);
    </script>

    <div id="host"></div>

    Can anybody help me to load the template in js. I dont have a html file in my application
    I am developing a app using web components
    Matt
    @systemsincode
    Anyone know of free hosting that supports webcomponents ie. lit-html and three.js out of the box or with npm or some pakage manager to install dependencies?
    Tomasz Pluskiewicz
    @tpluscode
    netlify.com or surge.sh?
    Matt
    @systemsincode

    netlify.com or surge.sh?

    Thanks I'll take a look

    hxgdzyuyi
    @hxgdzyuyi
    webcomponents is dead ? will be replaced by es moudles?
    Carlo Branca
    @cbranca

    @cbranca I would say it depends on the context and how you expect it the component to be used. Anything that is JS only will limit you from using it whrn writing HTML. In my experience most web components are part of a larger JS applicatiin so having methods is acceptable.

    Thank you @angrycat9000 . In my project the web components are complex widgets, we need methods and injection of a shared service's instance. I think that the approach does not follow the standard but, as you say, it is acceptable.

    Tomasz Pluskiewicz
    @tpluscode
    @hxgdzyuyi no. totally different things
    Sebastian Báez
    @SebasBaezCode

    Hi everyone, have used a web component in multiple domains? counts them as duplicate content? It is for SEO topics Thanks!

    For example: <static-text-component><static-text-component/> Contains -> Hello, my name is Sebastian, and... (700 words more...)
    If I have it in http://mydomain1.com and http://mydomain2.com Does Google find it as duplicate content and penalize me?

    I use StencilJs
    Thanks!
    Mark Dane
    @angrycat9000
    Any examples of how to internationalize/localize strings in web components?
    Tomasz Pluskiewicz
    @tpluscode
    there is not thing specific in the web components spec
    what libraries are you using?
    matrixbot
    @matrixbot

    Resynth > <@gitter_damntrecky:matrix.org> Hi everyone! I'm a developer for a company called ZingSoft. We have a product called ZingGrid which is a commercial grid web component. The code is closed source (https://github.com/ZingGrid/zinggrid) but available for free use in commercial products. How does we fit into the web component community and if we belong on this platform?

    I'm not trying to be spam or promotion, we are deeply involved and invested in web components and am wondering your thoughts on:

    1. commercial web components being available on webcomponents.org
    2. commercial web components in general. Is there a place for them for you? What would you expect

    Oh god no

    Resynth Terrible idea
    Resynth Also that is a promotion, you could've asked the question without mentioning your product is free for enterprises...
    Resynth Imagine putting nonfree components on webcomponents.org
    3 replies
    Mark Dane
    @angrycat9000
    @tpluscode I am using LitElement
    Tomasz Pluskiewicz
    @tpluscode
    good. I recently needed i18n and for lit-html this worked nicely: https://github.com/andreasbm/lit-translate
    sunilgidwani
    @sunilgidwani
    How it's different from React in term of Performance, coding ?
    Joe Pea
    @trusktr
    Hello!
    sunilgidwani
    @sunilgidwani
    hello Joe
    Joe Pea
    @trusktr
    I'd like to put http://lume.io elements on webcomponents, but it isn't ready yet. Got docs to write!
    Nick Ardecky
    @damntrecky

    Hi everyone! I'm a developer for a company called ZingSoft. We have a product called ZingGrid which is a commercial grid web component. The code is closed source (https://github.com/ZingGrid/zinggrid) but available for free use in commercial products. How does we fit into the web component community and if we belong on this platform?

    I'm not trying to be spam or promotion, we are deeply involved and invested in web components and am wondering your thoughts on:

    1. commercial web components being available on webcomponents.org
    2. commercial web components in general. Is there a place for them for you? What would you expect
    Vitaly Zdanevich
    @vitaly-zdanevich
    Hi, please check/update Wikipedia page, maybe add some screenshots.
    https://en.wikipedia.org/wiki/Web_Components
    plxmax
    @plxmax
    Hi. I am new to Web components. I want to use a search field and I found paper-search-panel. But I have no idea how to use it. Any ideas?
    Joe Pea
    @trusktr
    Do they have docs?
    @plxmax I just checked, and looks like they didn't document really how to actually import it. But I looked at the code, and they're relying on the old "HTML Imports" which has been removed from the web. So, you should not use that lib (or ask them to update it).
    I haven't tried it, but maybe vaadin elements has something you can use. They have a wide range of custom elements, and is actively maintained and documented, so you should be able to read the docs and figure out how to use the elements.
    Joe Pea
    @trusktr
    material-components-web-components is documented, should be easy to get started.
    Joe Pea
    @trusktr
    I recommend searching until you find some that are well documented so you know how to install them.
    http://webcomponents.org might have something you can use, but you need to check them out, see the docs, and see if they explain how to import them into a project or HTML page.
    Joe Pea
    @trusktr
    Each lib is different, some old, some new. Best bet is to rely on libs that have good documentation. The newer, the more likely they are to still work (f.e. they won't rely on defunct things APIs HTML Imports).
    Also ask questions on their GitHub pages. You might get help from specific libs there too.
    Arnur-K
    @Arnur-K
    How should web components look like, if my html looks like this
    graph-tree>
    <graph-tree-item label="Item 1">
    <graph-tree-item label="Item 1-1">
    <graph-tree-item label="Item 1-1-1"></graph-tree-item>
    </graph-tree-item>
    </graph-tree-item>
    </graph-tree>
    Tomasz Pluskiewicz
    @tpluscode
    what are you asking?
    5P4RK3R
    @5P4RK3R
    Hi Guys, I'm working on a web component with react and redux; I stumbled on a issue when i dispatch to the store, the state gets updated but the ui doesn't. It throws an error: Uncaught DOMException: Failed to execute 'attachShadow' on 'Element': Shadow root cannot be created on a host which already hosts a shadow tree.
    How can i fix this?
    Mark Dane
    @angrycat9000
    Sounds like you are trying to call attachShadow twice. It only needs to be called once. I would move it to the constructor of the web component @5P4RK3R
    5P4RK3R
    @5P4RK3R
    @angrycat9000 It worked thanks, But the elements gets appended when i change the state and it is showing the previous value and mutated value in ui
    Mark Dane
    @angrycat9000
    @5P4RK3R sounds like the element is just appending values. Probably need to reuse the existing elements or remove befor adding new ones. You can use the element.shadowRoot property to get access to the shadow root elements
    5P4RK3R
    @5P4RK3R
    @angrycat9000 Thanks mate, I used this.shadow.innerHTML to fix it
    Jeremy J Parmenter
    @JeremyJaydan
    Hey does anyone know if javascript is required for custom elements? I'm looking to simply style <flex-box></flex-box> with css into a re-usable css framework type deal. I'm wondering if there's some sort of catch when it comes to browser compatibility or something else?
    techboyg5
    @techboyg5
    Yes, you don't need JavaScript if you just want to use CSS to style that element. However note that shadow DOM requires JS.
    Jeremy J Parmenter
    @JeremyJaydan
    dope, thanks!
    techboyg5
    @techboyg5
    But I'd highly recommend class instead.
    Unrelated: Are there any web components that actually use closed shadow roots?