bigskysoftware / bigskysoftware/htmx
htmx:targetError with conditional hx-trigger
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
I have the following polling mechanism:
```html
```
Which polls an endpoint when `#typing-indicator` is present, and replaces the typing indicator with the response.
However, when `#typing-indicator` is absent from the DOM, a `htmx:targetError` is logged to console every second:
```
htmx:targetError htmx.org@2.0.7:1:27520
R https://unpkg.com/htmx.org@2.0.7:1
ae https://unpkg.com/htmx.org@2.0.7:1
fe https://unpkg.com/htmx.org@2.0.7:1
he https://unpkg.com/htmx.org@2.0.7:1
wt https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
(Async: setTimeout handler)
ct https://unpkg.com/htmx.org@2.0.7:1
timeout https://unpkg.com/htmx.org@2.0.7:1
```
The GET request to the `receive` endpoint is not executed as expected.
Contributor guide
Assessment
This issue has not been assessed yet.