Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow
LumeElement.defineElement()
to be called repeatedly wit…
…hout errors and it will not try to re-define an already defined element class, allow it to be called multiple times with different `name`s to define the same custom element using alternative tag names, allow a custom registry to be passed in for use cases like ShadowRoot-scoped custom element registries Also improved inline documentation of some features. BREAKING: `LumeElement`'s `static defineElement()` method no longer throws an error when called repeatedly with the same name or no name, which changes runtime behavior if anyone was previously relying on catching this error with `try-catch`. If you previous had logic in a catch block to detect already-defined elements, you can instead use `customElements.get(name)` to perform the check instead of using try-catch.
- Loading branch information