-
Notifications
You must be signed in to change notification settings - Fork 62
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 element declarations #11
Comments
They're not right now, but it's very close to the top of my todo list. |
@bodil did you have ideas of implementation here? For example all custom elements have a |
So I'm trying to clone ink, and I was hoping to use typed-html as the jsx-ish implementation, but without the ability to inject custom elements, I can't really do that. Is there any way I can help out with this issue? I haven't written a Rust macro in my life but I'm down to learn what I need to help <3 |
@zkat But Ink doesn't actually use HTML at all, does it? I think what you're looking for is something that lets you declare components and subcomponents using JSX syntax, but not HTML, so typed-html is out of scope for what you're trying to do. What you might do is adapt the parser and the proc macro stuff from typed-html to suit your own ends, but strip out all the HTML related stuff and replace it with your own codegen. Alternatively, look at what I'm doing with vgtk, which has an actual component model, but which also has a lot of extraneous stuff for declaring Gtk widgets, and also the parser is currently terrible. As for how to implement support for a component model in typed-html, I've had no good ideas since I left it on my todo list. It's too tied up in general to the implementation details, I suspect. |
So, I imagine custom elements are not supported? I think it would be very beneficial to be able to define custom elements and have those type checked as well
The text was updated successfully, but these errors were encountered: