js:myFunc syntax
js:myFunc syntax can be used in the hx-get, hx-post etc.. tags to define handler functions implicitly.
HTML
<button hx-get="js:myFunc" hx-swap="outerHTML" hx-ext="serverless">
Click to replace via myFunc!
</button>
JS
function myFunc(text, params, xhr) {
return 'Hi!';
}