Spec-Zone.ru › htmx

htmx.config.noSwap

Sets HTTP status codes that skip swap

The htmx.config.noSwap option is an array of HTTP status codes for which htmx will not perform a content swap.

Default: [204, 304]

Example

htmx.config.noSwap = [204, 304, 205];
<meta name="htmx-config" content='{"noSwap":[204,304,205]}'>

Responses with these status codes will trigger events but won’t swap content.

See Also

  • hx-status
  • htmx:response:error

Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/config/htmx-config-noSwap/

Spec-Zone.ru

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