trix
trix copied to clipboard
Idempotent Custom Element registration
If the package is accidentally imported a second time, the Custom Element registrations will raise an exception like:
NotSupportedError: Cannot define multiple custom elements with the same tag name
This commit adds a guard that checks whether or not the element has been registered through a call to CustomElementRegistry.get. When present, the redundant call to CustomElementRegistry.define is skipped.