-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
I have the following polling mechanism:
<div id="poll-messages"
hx-get="./receive"
hx-trigger="every 1s [document.querySelector('#messages #typing-indicator') !== null] queue:none"
hx-target="#messages #typing-indicator"
hx-swap="outerHTML scroll:bottom"
hx-disabled-elt="#chat-form button"
class="is-hidden"
>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 [email protected]:1:27520
R https://unpkg.com/[email protected]:1
ae https://unpkg.com/[email protected]:1
fe https://unpkg.com/[email protected]:1
he https://unpkg.com/[email protected]:1
wt https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
(Async: setTimeout handler)
ct https://unpkg.com/[email protected]:1
timeout https://unpkg.com/[email protected]:1
The GET request to the receive endpoint is not executed as expected.
Metadata
Metadata
Assignees
Labels
No labels