bigskysoftware / bigskysoftware/htmx
`target:this` doesn't work in hx-boost advanced syntax (v4.0.0)
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
I noticed while trying out the new [advanced syntax](https://four.htmx.org/reference/attributes/hx-boost#advanced-syntax) for `hx-boost` that having a `target:this` fails.
Failing example:
```html
Follow Me For Boosted Navigation
```
Performs an un-boosted navigation and yields the following error in the console:
```
htmx: 'this' on hx-target did not match any element
```
Other selectors I have tried have worked, e.g.:
```html
Follow Me For Boosted Navigation
```
Contributor guide
Research direction
Start at the hx-boost advanced-syntax handling linked in the issue and trace how target:this is passed to hx-target resolution; compare it with the working target:'closest a' case. Add coverage for the supplied anchor example and confirm that navigation remains boosted, uses outerHTML swapping, and targets the anchor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100