lit / lit-element

LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
https://lit-element.polymer-project.org
BSD 3-Clause "New" or "Revised" License
4.49k stars 319 forks source link

idempotent/soft customElement decorator #1189

Closed gullerya closed 2 years ago

gullerya commented 3 years ago

Description

Acceptance criteria

Defining the component named my-component twice won't throw

TLDR;

The below assumptions are leading to an issue with current, strict, customElement decorator behavior:

Downsides (tolarable from our POV, but probably require attention from your side as a platform):

If the non-deterministic downside is a major concern, the decorator may:

sorvell commented 2 years ago

This isn't something we want to include in the core library, but you should feel free to create your own decorators for these types of use cases. Please open a new issue if you need guidance on how to proceed. Thanks!