code-input icon indicating copy to clipboard operation
code-input copied to clipboard

Library hardcoded to `code-input` element name

Open WebCoder49 opened this issue 4 months ago • 0 comments

If any other custom element with the name code-input is loaded, it will clash.

  • The JavaScript could be made with a try...catch statement to only register with the name code-input if it's not yet taken and allow registering of the exported CodeInput element class under any name.
  • The CSS would be more difficult to change dynamically. Should it be loaded by the JavaScript in major version 3? If so, that may be bad for progressive enhancement. Perhaps how to modify the element name via code patches should be included in the docs.

WebCoder49 avatar Aug 19 '25 12:08 WebCoder49