Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    angrycat9000
    @angrycat9000
    I do not know if you can justify it. I have written web components with both LitElement and plain JS. Lit makes it easier to add properties and atttributes, but I would not say that it does what no other tool can. Maybe rewrite one component in vanilla JS and then you can show a comparison with lines of code to justify ease of use for the programmer?
    Yavuz Secer
    @y.secer_gitlab
    i already did write an application in vanilla to compare against the web component approach. The issue still remains why it had to be Lit-Element and no other Tool like stencil for instance.
    And comparing lines of code is not a meaningful criteria.
    John Michael Swartz
    @graphographer
    That question doesn't make sense. All of these tools aim to accomplish the same thing but with slightly different programming interfaces or paradigms.
    Maybe if we knew more about your project we could come up with some more compelling bs
    MaoYiWei
    @sanmaopep
    Hi, guys. Anyone who knows how to reset the constructor in customElements.define('mytag', constructor)? Since once I define it, I can not change the constructor anymore or it will throw a error that the element is registered.
    angrycat9000
    @angrycat9000
    @sanmaopep The custom element registry doesn't seem to support re-defining elements (https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry) Is it possible to define it only once, or define the new one as a different element?
    angrycat9000
    @angrycat9000
    Anyone have experience getting web components to work in Android 4.4?
    Zahed Hossain
    @zahedbri
    how to publish a project in page
    Tomasz Pluskiewicz
    @tpluscode
    what are you asking?
    José Luis Aguilera
    @JoseLuisA_gitlab
    Hello @ angrycat9000. Android 4.4 doesn't support V1 web components. (Except HTML Templates) Maybe using polyfills.https://caniuse.com/#search=web%20components
    José Luis Aguilera
    @JoseLuisA_gitlab
    kingabdr
    @kingabdr
    Hello guys, I'm a Polymer newbie .. I have a problem with the iron selector component
    setting the default selection by the "selected" property doesn't work with "multi"
    I appreciate any help :)
    angrycat9000
    @angrycat9000
    Thanks @JoseLuisA_gitlab .I had tried polyfills but was still getting errors. :-/ I read about some babel features that lit-element recommends using so I will have to try including those when I have time to look at it again.
    Hi @kingabdr , have you tried the selectedItems and selectedValues properties. This page indicates that those properties are the multi-select equivalent of selectedItem and selected. https://www.webcomponents.org/element/@polymer/iron-selector
    Philip Durbin
    @pdurbin
    I've been playing around with Web Components and I'm pretty happy with how this turned out: https://github.com/IQSS/dataverse-tv ... You can see it live at https://iqss.github.io/dataverse-tv/
    Bruno Marcel Marcondes
    @brunomarcel
    Hello people,
    someone know something about jest supports to Custom Elements, Shadow Dom, without polyfill?
    Tomasz Pluskiewicz
    @tpluscode
    IIRC jest does not run in real browsers
    have you seen open-wc.org? they built a magnificent karma setup
    angrycat9000
    @angrycat9000
    Does anyone have a good example of how to package web components for distribution that you expect to be include as part of a larger project build? I don't want to do a complete bundle since many of the dependencies will also be in the larger project (ie LitElement).
    Tomasz Pluskiewicz
    @tpluscode
    TL;DR; just publish ES6 modules
    there really isn't much to it. if it's TS you need to tsc and if it's JS then you should not need to do anything really
    angrycat9000
    @angrycat9000
    Thanks @tpluscode
    Benny Powers
    @bennypowers
    tl:dr; publish es2017 until edgium launches, then publish es2019. don't publish multiple builds.
    angrycat9000
    @angrycat9000
    Makes sense. One of my projects is trying to support webview on android 4.4 so anything that would be used out of the box would be horribly bloated for modern browsers
    Avichay Eyal
    @eavichay
    Hey all, quick question: Where can I find an example for writing custom-element.json file descriptor and an IDE plugin to work with?
    Yousef Shanawany
    @AskYous
    Hello. Since HTML imports are going away, what's the alternative right now?
    I use <template> but I have all my <template>s in one file, which is annoying
    angrycat9000
    @angrycat9000
    @AskYous For building a webcomponent? JS module import with class that extends HTMLElement. You manage the HTML and CSS for the component via JS.
    Yavuz Secer
    @y.secer_gitlab
    what would be good criteria to compare a web application written with AND without web components?
    assuming the without web components approach tries to mimic components via modules
    Yousef Shanawany
    @AskYous
    @angrycat9000 , where would the HTML for a web component live? Shouldn't it be in its own HTML file? If so, that file can't be imported using JS modules. JS modules only import JS.
    @y.secer_gitlab, number of lines of code, number of external libraries, and how well the app follows loose coupling and seperation of concerns.
    Benny Powers
    @bennypowers
    @eavichay you might want to try web-component-analyzer
    Yavuz Secer
    @y.secer_gitlab
    can anyone help me with the lit-element 404 error
    when importing like this: import { LitElement, html } from "lit-element";
    kingabdr
    @kingabdr
    Hello, I'm using the iron-"@polymer/iron-localstorage": "^3.0.1" . It works well on my login element to store the user Id after login. Any idea how to access the stored user Id from another element (like Home-element where to display the user Id)?
    Benny Powers
    @bennypowers
    @y.secer_gitlab browsers can't understand statements like import Foo from 'bar'
    You have to either use a fully qualified url like https://unpkg.com/lit-element?module
    Or use a build tool like rollup with rollup-plugin-node-resolve
    Or use a server like es-dev-server which transforms import specifiers to urls for you
    Bogdan Tsap
    @bohdaq
    Hi folks,
    Im trying to publish Polymer 3 component but im not able to see Demo menu option? Could someone advise me how to make it show?
    This is the n