-
Notifications
You must be signed in to change notification settings - Fork 200
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
Custom HSX #2009
Comments
I like the idea 👍 one alternative could also be adding an [uncheckedHsx||] quasi quoter. Like hsx but without any checking of the attributes or tag names. Your approach feels more in line with type safety, so likely we should go with makeCustomHsx :) |
Great! If it doesn't prove to be extremely difficult, I could try to add |
Great, let's try that 👍 |
The custom thing was far too complex for me to deal with right now, so I went with |
Hi!
Sometimes, I would like to avoid using
{...[("non-standard-attribute", "value" :: Text)]}
in hsx and rather be able to extend it with my own whitelist of attributes I commonly use.When using custom elements or js libraries with non-standard attributes, it would be nice to just have a custom HSX that just adds a whitelist.
I guess we could have it as a low level function that also hsx could use.
And with something like this, one can enjoy compile-time type-safety with custom attributes:
And then we could do this:
I haven't actually tested it, so it's just pseudo for now.
If interesting, I could attempt a pull request.
The text was updated successfully, but these errors were encountered: