Open sirinath opened 4 years ago
maybe we should support the "javascript:" standard from anchor tags:
<a href="javascript:show_more_menu();">More >>></a>
https://stackoverflow.com/questions/7347786/html-anchor-tag-with-javascript-onclick-event
Also worth pondering:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
I think the options to have JavaScript or data can replace content would be a great addition. Also using the standard javascript:
and data:
would be the best options. Also in the case of JS JSX also can be supported.
we have an open branch exploring this option now:
https://github.com/bigskysoftware/htmx/tree/feature_js_expression_support
It's been a few years, what's the status on this? Is it still something that is being looked into? If any assistance is needed l'll try to contribute where I can.
Is it still something that is being looked into?
Likely not! If it were to be implemented today though, we'd ask for it to start as an extension and not directly added to the core library. If you want to give a shot at implementing this @TastyWaffles , please feel free to do so! You'll want to take a look at the extensions repo as well as the extensions website deployed from it, where we have a section to list community extensions.
Thanks! I'm happy to take a look, no promises though!
Can
hx-js
be added so content can be returned by JS.