bigskysoftware / bigskysoftware/htmx
Feature request: hx-init attribute or simpler equivalent
Open
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
Thank you for providing a refreshing way to create for the web.
I find myself hooking into hyperscript and javascript whenever I need to do some initialisation work on an htmx component.
Hyperscript:
```hyperscript
init log 'init'
```
HTMX JS API:
```javascript
htmx.onLoad(el, () => {
if (el == htmx.find('#my-comp')) {
console.log('init', el)
}
})
```
I imagine `hx-on` could also be used, although I haven't tested it):
```html
```
Contributor guide
Assessment
This issue has not been assessed yet.