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

Support Hyperscript attribute #5

Closed
maciejtrybilo opened this issue Oct 24, 2024 · 5 comments
Closed

Support Hyperscript attribute #5

maciejtrybilo opened this issue Oct 24, 2024 · 5 comments

Comments

@maciejtrybilo
Copy link

Hyperscript complements HTMX nicely. It would be great to add an attribute for Hyperscript code, so e.g.

.custom(name: "_", value: "on submit trigger closeModal")

could be written something like

.hs("on submit trigger closeModal")

Presumably adding a new library analogously to https://github.com/sliemeobn/elementary-htmx.git would be most orderly even though it would just be adding one attribute?

@sliemeobn
Copy link
Collaborator

hmm... nice idea.
but since it really just the one attribute, its own package feels like a lot of song and dance 🤔

I can imagine simply adding it to the htmx package, or, maybe just documenting how to extend this in you own package.
it is basically three lines of code... anyone can write them.

thoughts?

@maciejtrybilo
Copy link
Author

Makes sense. Should I open a PR for htmx package?

@sliemeobn
Copy link
Collaborator

@maciejtrybilo that would be fantastic, thanks.

I am thinking a separate target with .hyperscript attribute?

@sliemeobn
Copy link
Collaborator

@maciejtrybilo any news on this?

I'd rather close the issue here, since it is really not the connected to the vapor integration package.
feel free to start a PR or raise the issue again on the htmx package repo 🙏

@maciejtrybilo
Copy link
Author

@sliemeobn I'm sorry about the delay, the PR is ready! sliemeobn/elementary-htmx#13 Please let me know if you would like any changes.

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

No branches or pull requests

2 participants