-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Merge colliding html and svg attr names into shared namespace. #71
Labels
Comments
Hey, that's an interesting issue! Sorry I'm not super responsive right now, I should be able to take a look at this in depth around next weekend. |
The new code generator developed in #89 can do this, if you rename the keys to prevent naming conflicts. This kind of decision is now up to the consuming libraries. For Laminar, I gave it some more thought, and decided to keep the types as-is for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to merge colliding html and svg attribute names into a shared definition.
Attrs like
height
orhref
exist in both html and svg so when we import bothdsl._
anddsl.svg._
then this codea(href := "example.com")
causes a compiler error until we rename one of the attrs:import dsl.svg.{href => svgHref, _}
.I would like to create a third attr definition file which contains all colliding attrs which could then be used in both svg and html tags.
Ideally I would like to do the same for tags, but thats where things get a little more complicated since they would also have to produce the correct element based on context and that would probably require some implicit conversion magic.
In this issue I would like to hear some feedback on the general idea before I go forth with implementing this.
The text was updated successfully, but these errors were encountered: