Spec-Zone.ru › htmx

htmx:after:request

Fires after response.text()

The htmx:after:request event fires immediately after the fetch() call resolves and the response is received.

When It Fires

After the server responds, before content swapping occurs.

Event Detail

  • ctx - Request context including response data

Example

htmx.on('htmx:after:request', (evt) => {
  console.log('Response status:', evt.detail.ctx.response.status);
  // Hide loading indicator
});

The response is available but hasn’t been swapped into the DOM yet.

Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/events/htmx-after-request/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API