You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a set of ui components based on web components recently. The technology selection uses svelte, but with the development of the components, I found a problem, I hope svelte can be compatible, the problem is this, I developed the icon component, This component will be used in many components. The wc component is different from the previous svelte, react, and vue. It is packaged into shadowdom. If my button component and modal component use a certain component of icon, an error will be reported." Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "icon-triangle" has already been used with this registry", the solution is to change this section to "if (component.tag ! = null) {
body.push(b !@_customElements.get("${component.tag}") && @_customElements.define("${component.tag}", ${name}););
}"
Describe the problem
I am developing a set of ui components based on web components recently. The technology selection uses svelte, but with the development of the components, I found a problem, I hope svelte can be compatible, the problem is this, I developed the icon component, This component will be used in many components. The wc component is different from the previous svelte, react, and vue. It is packaged into shadowdom. If my button component and modal component use a certain component of icon, an error will be reported." Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "icon-triangle" has already been used with this registry", the solution is to change this section to "if (component.tag ! = null) {
body.push(b
!@_customElements.get("${component.tag}") && @_customElements.define("${component.tag}", ${name});
);}"
Describe the proposed solution
"if (component.tag ! = null) {
body.push(b
!@_customElements.get("${component.tag}") && @_customElements.define("${component.tag}", ${name});
);}"
Alternatives considered
"if (component.tag ! = null) {
body.push(b
!@_customElements.get("${component.tag}") && @_customElements.define("${component.tag}", ${name});
);}"
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: