versioned web components

  • web components are used for cross-framework UI libraries, micro-frontends
  • people want to mix multiple versions of a custom element with the same name
  • prior art: scoped element registries
    • tricky to use, non-declarative, and no support for hydration

imagine

  • customElements.define('name', Name, {version: 2})

next steps

  • complete and submit the proposal
  • build a polyfill
  • demo it with a real UI library

how does this compare to appending the version to the element name itself?

  • annevk: The main reason for scoping is that you might have multiple libraries that conflict in some way and the libraries are not designed to account for conflicts.
  • annevk: If you control all the code there's not much need for this I think.