bigskysoftware / bigskysoftware/htmx

Feature request: hx-init attribute or simpler equivalent

Open
#2,863 10 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.