Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability not to treat every tag with - in name as web component #290

Open
MrFoxPro opened this issue Nov 13, 2023 · 4 comments
Open

Add ability not to treat every tag with - in name as web component #290

MrFoxPro opened this issue Nov 13, 2023 · 4 comments

Comments

@MrFoxPro
Copy link
Contributor

MrFoxPro commented Nov 13, 2023

I tried to use custom tag names for better debugging, but solid treats them as web components, and, for example, data-* attribues don't work: https://playground.solidjs.com/anonymous/7c8c3bd2-59ed-49f1-bb5d-f86d8ed1df14
I wish to have ability to disable this behaviour in babel options.

@chiefcll
Copy link

chiefcll commented May 4, 2024

Are you using a universal renderer? Seems like you're trying to render non html elements and additionally you want to override the HTML spec for webcomponents for - to be something other than a custom element? I assume you'd only want to do this when building a custom renderer?

For HTML you have inspector for easy debugging.

@MrFoxPro
Copy link
Contributor Author

MrFoxPro commented May 4, 2024

Are you using a universal renderer? Seems like you're trying to render non html elements and additionally you want to override the HTML spec for webcomponents for - to be something other than a custom element? I assume you'd only want to do this when building a custom renderer?

For HTML you have inspector for easy debugging.

No, I'm not using universal renderer.
Could you please point to the statement in specification that any HTML tag with dash between words is automatically considered as Custom element? AFAIK any tag is considered as HTMLElement in all browsers, and could be upgraded to Custom elements with JavaScript.

@MrFoxPro
Copy link
Contributor Author

MrFoxPro commented May 4, 2024

https://stackoverflow.com/questions/22545621/do-custom-elements-require-a-dash-in-their-name

Dash in the name is necessary but not enough for browser to treat tag as custom element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants