{
  "$schema": "https://json.schemastore.org/web-types",
  "name": "htmx",
  "version": "4.0.0-beta6",
  "default-icon": "./htmx.svg",
  "js-types-syntax": "typescript",
  "description-markup": "markdown",
  "contributions": {
    "html": {
      "elements": [
        {
          "name": "hx-partial",
          "description": "Routes response content to a specific target. Use `hx-target` or `id` to choose the destination and `hx-swap` to choose the swap style.",
          "doc-url": "https://four.htmx.org/docs#partials-hx-partial"
        }
      ],
      "attributes": [
        {
          "name": "hx-get",
          "description": "Issues a `GET` request to the specified URL and swaps the response into the DOM.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-get"
        },
        {
          "name": "hx-post",
          "description": "Issues a `POST` request to the specified URL and swaps the response into the DOM.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-post"
        },
        {
          "name": "hx-put",
          "description": "Issues a `PUT` request to the specified URL and swaps the response into the DOM.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-put"
        },
        {
          "name": "hx-patch",
          "description": "Issues a `PATCH` request to the specified URL and swaps the response into the DOM.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-patch"
        },
        {
          "name": "hx-delete",
          "description": "Issues a `DELETE` request to the specified URL and swaps the response into the DOM.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-delete"
        },
        {
          "name": "hx-trigger",
          "description": "Controls which event specifications trigger an element's request. Supports filters and modifiers such as `delay`, `throttle`, `once`, `changed`, `from`, and `target`.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-trigger"
        },
        {
          "name": "hx-swap",
          "description": "Controls how response content is inserted. Supports swap styles such as `innerHTML`, `outerHTML`, `textContent`, `beforebegin`, `afterbegin`, `beforeend`, `afterend`, `innerMorph`, `outerMorph`, `outerSync`, `delete`, `none`, and extension-provided styles.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-swap:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-swap"
        },
        {
          "name": "hx-target",
          "description": "Specifies where to insert the response content. Accepts CSS selectors, `this`, and htmx extended selectors such as `closest`, `find`, `next`, and `previous`.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-target:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-target"
        },
        {
          "name": "hx-select",
          "description": "Selects the part of the response to swap into the target. The value is a CSS selector.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-select:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-select"
        },
        {
          "name": "hx-on",
          "pattern": {
            "or": [
              {
                "items": [
                  "/js/events"
                ],
                "template": [
                  "hx-on:",
                  "#...",
                  "#item:JS event"
                ]
              },
              {
                "items": [
                  "/js/htmx-events"
                ],
                "template": [
                  "hx-on::",
                  "#...",
                  "#item:HTMX event"
                ]
              }
            ]
          },
          "description": "Wires inline JavaScript to run when an event fires. Use `hx-on:event` for any DOM event, or `hx-on::event` as shorthand for `hx-on:htmx:event`.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-on"
        },
        {
          "name": "hx-vals",
          "description": "Adds values to request parameters. Accepts HCON/JSON, and can evaluate JavaScript expressions with the `js:` prefix.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-vals:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-vals"
        },
        {
          "name": "hx-include",
          "description": "Includes additional element values in the request. Accepts CSS selectors, `this`, and htmx extended selectors.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-include:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-include"
        },
        {
          "name": "hx-swap-oob",
          "description": "Marks response elements to swap into the page out of band, outside the normal target.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-swap-oob"
        },
        {
          "name": "hx-select-oob",
          "description": "Selects response elements to swap into the page out of band.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-select-oob:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-select-oob"
        },
        {
          "name": "hx-push-url",
          "description": "Pushes a URL into browser history after a request. Accepts `true`, `false`, or a URL.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-push-url:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-push-url"
        },
        {
          "name": "hx-replace-url",
          "description": "Replaces the current browser history URL after a request. Accepts `true`, `false`, or a URL.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-replace-url:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-replace-url"
        },
        {
          "name": "hx-headers",
          "description": "Adds custom headers to the request. Accepts HCON/JSON, and can evaluate JavaScript expressions with the `js:` prefix.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-headers:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-headers"
        },
        {
          "name": "hx-encoding",
          "description": "Sets the request encoding type. Use `multipart/form-data` for file uploads.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-encoding:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-encoding"
        },
        {
          "name": "hx-indicator",
          "description": "Specifies the element or elements that receive the `htmx-request` class while the request is in flight.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-indicator:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-indicator"
        },
        {
          "name": "hx-boost",
          "description": "Converts eligible links and forms to htmx-powered requests while preserving progressive enhancement. Can carry boost-specific request config.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-boost:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-boost"
        },
        {
          "name": "hx-sync",
          "description": "Synchronizes requests between elements using strategies such as `drop`, `abort`, `replace`, `queue first`, `queue last`, and `queue all`.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-sync:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-sync"
        },
        {
          "name": "hx-confirm",
          "description": "Shows a confirmation dialog before issuing a request. A `js:` value can run custom confirmation logic.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-confirm:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-confirm"
        },
        {
          "name": "hx-validate",
          "description": "Runs HTML5 constraint validation before sending the request.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-validate"
        },
        {
          "name": "hx-disable",
          "description": "Disables selected elements while the request is in flight.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-disable:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-disable"
        },
        {
          "name": "hx-ignore",
          "description": "Disables htmx processing for the element and its descendants.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-ignore"
        },
        {
          "name": "hx-preserve",
          "description": "Preserves an element with a stable `id` across swaps when the response contains a matching element.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-preserve"
        },
        {
          "name": "hx-preload",
          "description": "Preloads content before the user triggers a request. Requires the preload extension.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-preload:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-preload"
        },
        {
          "name": "hx-optimistic",
          "description": "Shows optimistic UI content from a template while a request is in flight. Requires the optimistic extension.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-optimistic"
        },
        {
          "name": "hx-status",
          "pattern": {
            "regex": "hx-status:(\\d{3}|\\d{2}[xX]|\\d[xX]{2})"
          },
          "description": "Overrides swap behavior for specific HTTP response status codes. Supports exact codes such as `404` and wildcard patterns such as `50x` and `5xx`.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-status"
        },
        {
          "name": "hx-action",
          "description": "Specifies the URL that receives the request. Use with `hx-method` or as the shared action for verb-specific attributes.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-action"
        },
        {
          "name": "hx-method",
          "description": "Specifies the HTTP method to use with `hx-action`. Valid methods are `GET`, `POST`, `PUT`, `PATCH`, and `DELETE`.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-method"
        },
        {
          "name": "hx-config",
          "description": "Configures per-request behavior using HCON or JSON. Values are merged into the request config; `mode` is always reset to the global `htmx.config.mode`.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-config:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/reference/attributes/hx-config"
        },
        {
          "name": "hx-history-elt",
          "description": "Marks the element that htmx swaps when restoring browser history. If absent, htmx falls back to the body element.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-history-elt"
        },
        {
          "name": "hx-sse:connect",
          "description": "Establishes a persistent Server-Sent Events connection. Defaults to loading immediately, reconnecting with exponential backoff, and pausing on background tabs.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#hx-sseconnect"
        },
        {
          "name": "hx-sse:close",
          "description": "Closes an SSE connection when a named event matching the attribute value is received from the server.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#hx-sseclose"
        },
        {
          "name": "hx-ws:connect",
          "description": "Establishes a WebSocket connection to the specified URL. Requires the WebSocket extension.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#hx-wsconnect"
        },
        {
          "name": "hx-ws:send",
          "description": "Sends form data and `hx-vals` to a WebSocket when the element is triggered. Requires the WebSocket extension.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#hx-wssend"
        },
        {
          "name": "hx-head",
          "description": "Controls how the hx-head extension merges or appends response `<head>` content.",
          "doc-url": "https://four.htmx.org/extensions/hx-head#hx-head"
        },
        {
          "name": "hx-browser-indicator",
          "description": "Enables the browser native loading indicator for this element's requests when set to `true`. Requires the browser-indicator extension.",
          "doc-url": "https://four.htmx.org/extensions/hx-browser-indicator#usage"
        },
        {
          "name": "hx-targets",
          "description": "Swaps the same response content into all elements matching the selector. Requires the targets extension.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-targets:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/extensions/hx-targets#usage"
        },
        {
          "name": "hx-ptag",
          "description": "Sets the initial per-element polling tag sent as the `HX-PTag` request header. Requires the ptag extension.",
          "doc-url": "https://four.htmx.org/extensions/hx-ptag#setting-an-initial-ptag"
        },
        {
          "name": "hx-history",
          "description": "Opts an element or page out of the history-cache extension when set to `false`.",
          "doc-url": "https://four.htmx.org/extensions/hx-history-cache#usage"
        },
        {
          "name": "hx-nonce",
          "description": "Marks htmx elements as server-rendered trusted markup for the CSP extension nonce gate.",
          "doc-url": "https://four.htmx.org/extensions/hx-csp#the-hx-nonce-attribute"
        },
        {
          "name": "hx-live",
          "description": "Runs a reactive expression whenever hx-live observes relevant DOM or state changes. Requires the hx-live extension.",
          "doc-url": "https://four.htmx.org/extensions/hx-live#hx-live"
        },
        {
          "name": "hx-live:*",
          "pattern": {
            "regex": "hx-live:.+"
          },
          "description": "Binds a reactive expression to an attribute, property, class, style, text, or HTML update. Requires the hx-live extension.",
          "doc-url": "https://four.htmx.org/extensions/hx-live#hx-liveattr"
        },
        {
          "name": "hx-prompt",
          "description": "Prompts before a request, sends the answer as the `HX-Prompt` header, and aborts when the user cancels. Requires the prompt extension.",
          "description-sections": {
            "Inheritance": "Use the :inherited modifier (for example, `hx-prompt:inherited`) to apply this attribute to htmx requests in child elements."
          },
          "doc-url": "https://four.htmx.org/extensions/hx-prompt#usage"
        }
      ]
    },
    "css": {
      "classes": [
        {
          "name": "htmx-added",
          "description": "Applied to newly inserted content before settling, then removed after the settle phase.",
          "doc-url": "https://four.htmx.org/docs#css-transitions"
        },
        {
          "name": "htmx-indicator",
          "description": "Default indicator class hidden by htmx CSS until a containing or matching element receives `htmx-request`.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-indicator"
        },
        {
          "name": "htmx-request",
          "description": "Applied to the request indicator elements while a request is in flight.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-indicator"
        },
        {
          "name": "htmx-settling",
          "description": "Applied to a target during the settle phase, then removed after settling completes.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-swap#settle"
        },
        {
          "name": "htmx-swapping",
          "description": "Applied to a target during the swap delay, then removed when content is inserted.",
          "doc-url": "https://four.htmx.org/reference/attributes/hx-swap#swap"
        },
        {
          "name": "hx-optimistic",
          "description": "Applied to optimistic UI content inserted by the hx-optimistic extension.",
          "doc-url": "https://four.htmx.org/extensions/hx-optimistic#styling"
        }
      ]
    },
    "js": {
      "events": [
        {
          "name": "HTMX event",
          "pattern": {
            "items": [
              "/js/htmx-events"
            ],
            "template": [
              "htmx:",
              "$...",
              "#item:HTMX event"
            ]
          }
        },
        {
          "name": "every",
          "description": "Periodic polling event emitted by `hx-trigger=\"every <timing>\"`.",
          "doc-url": "https://four.htmx.org/reference/events/every"
        },
        {
          "name": "intersect",
          "description": "Event emitted when an element observed by `hx-trigger=\"intersect\"` enters the viewport.",
          "doc-url": "https://four.htmx.org/reference/events/intersect"
        }
      ],
      "htmx-events": [
        {
          "name": "abort",
          "description": "Listened for by htmx. Trigger `htmx:abort` on an element with an in-flight request to abort that request.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-abort"
        },
        {
          "name": "before:init",
          "description": "Fires before htmx initializes a specific element. Event detail is empty.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-init"
        },
        {
          "name": "after:init",
          "description": "Fires after htmx initializes a specific element. Event detail is empty.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-init"
        },
        {
          "name": "before:process",
          "description": "Fires before htmx processes a DOM node. Event detail is empty.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-process"
        },
        {
          "name": "after:process",
          "description": "Fires after htmx processes a DOM node. Event detail is empty.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-process"
        },
        {
          "name": "after:implicitInheritance",
          "description": "Fires after implicit inheritance is applied to an element.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-implicitInheritance"
        },
        {
          "name": "before:cleanup",
          "description": "Fires before htmx removes listeners and internal data from an element. Event detail is empty.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-cleanup"
        },
        {
          "name": "after:cleanup",
          "description": "Fires after htmx removes listeners and internal data from an element. Event detail is empty.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-cleanup"
        },
        {
          "name": "config:request",
          "description": "Fires after request parameters are collected and before the request is issued. `detail.ctx` is the request context and can be modified.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-config-request"
        },
        {
          "name": "confirm",
          "description": "Fires when confirmation is required. `detail.ctx` is the request context; call `preventDefault()` and `detail.issueRequest()` for custom dialogs.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-confirm"
        },
        {
          "name": "before:request",
          "description": "Fires immediately before `fetch()` is called. `detail.ctx` is the request context. Cancel to stop the request.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-request"
        },
        {
          "name": "before:response",
          "description": "Fires after response headers are received but before the body is consumed. `detail.ctx.response.raw` is the unconsumed `Response`.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-response"
        },
        {
          "name": "after:request",
          "description": "Fires after the response body is consumed. `detail.ctx` contains request, response, and text data.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-request"
        },
        {
          "name": "response:error",
          "description": "Fires when an HTTP error status code (400 or higher) is received. `detail.ctx.response.status` contains the status code.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-response-error"
        },
        {
          "name": "finally:request",
          "description": "Always fires at the end of the request lifecycle. `detail.ctx` is the request context.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-finally-request"
        },
        {
          "name": "error",
          "description": "Fires when a network, request, swap, or JavaScript error occurs. `detail.error` contains the error when available.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-error"
        },
        {
          "name": "before:swap",
          "description": "Fires before content is swapped. `detail.ctx` is the request context and `detail.tasks` contains the swap tasks. Cancel to skip the swap.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-swap"
        },
        {
          "name": "after:swap",
          "description": "Fires after content is swapped into the DOM. `detail.ctx` is the request context.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-swap"
        },
        {
          "name": "finally:swap",
          "description": "Fires after a swap attempt finishes, even when the swap throws or is skipped. `detail.ctx` is the request context.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-finally-swap"
        },
        {
          "name": "before:settle",
          "description": "Fires before the settle phase. `detail.task`, `detail.newContent`, and `detail.settleTasks` describe the settle work.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-settle"
        },
        {
          "name": "after:settle",
          "description": "Fires after the settle phase completes. `detail.task`, `detail.newContent`, and `detail.settleTasks` describe the settled work.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-settle"
        },
        {
          "name": "before:history:update",
          "description": "Fires before htmx pushes or replaces browser history. The detail contains the history update information.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-history-update"
        },
        {
          "name": "after:history:update",
          "description": "Fires after htmx pushes or replaces browser history. The detail contains the history update information.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-history-update"
        },
        {
          "name": "after:history:push",
          "description": "Fires after htmx pushes a new browser history entry. `detail.path` is the pushed path.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-push-into-history"
        },
        {
          "name": "after:history:replace",
          "description": "Fires after htmx replaces the current browser history entry. `detail.path` is the replaced path.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-replace-into-history"
        },
        {
          "name": "before:history:restore",
          "description": "Fires before htmx restores a history entry. `detail.path` is the restored path and `detail.cacheMiss` is set for core re-fetch restores.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-restore-history"
        },
        {
          "name": "before:viewTransition",
          "description": "Fires before a View Transition API swap task starts. `detail.task` is the swap task.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-before-viewTransition"
        },
        {
          "name": "after:viewTransition",
          "description": "Fires after a View Transition API swap task completes. `detail.task` is the swap task.",
          "doc-url": "https://four.htmx.org/reference/events/htmx-after-viewTransition"
        },
        {
          "name": "before:sse:connection",
          "description": "Fires before an SSE connection attempt. `detail.connection` can be modified; set `cancelled` or cancel the event to stop connecting.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#htmxbeforesseconnection"
        },
        {
          "name": "after:sse:connection",
          "description": "Fires after a successful SSE connection or reconnection. `detail.connection` describes the connection.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#htmxaftersseconnection"
        },
        {
          "name": "sse:close",
          "description": "Fires when an SSE connection closes. `detail.connection` and `detail.reason` describe the close.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#htmxsseclose"
        },
        {
          "name": "sse:error",
          "description": "Fires when an SSE stream error occurs. `detail.error`, `detail.url`, and sometimes `detail.status` describe the failure.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#htmxsseerror"
        },
        {
          "name": "before:sse:message",
          "description": "Fires before an SSE message is processed. `detail.message` contains `data`, `event`, `id`, and `cancelled`.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#htmxbeforessemessage"
        },
        {
          "name": "after:sse:message",
          "description": "Fires after an SSE message is processed. `detail.message` contains `data`, `event`, and `id`.",
          "doc-url": "https://four.htmx.org/extensions/hx-sse#htmxafterssemessage"
        },
        {
          "name": "before:ws:connection",
          "description": "Fires before a WebSocket connection attempt. `detail.connection` can be modified; set `cancelled` or cancel the event to stop connecting.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxbeforewsconnection"
        },
        {
          "name": "after:ws:connection",
          "description": "Fires after a successful WebSocket connection. `detail.connection` describes the connection.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxafterwsconnection"
        },
        {
          "name": "ws:close",
          "description": "Fires when a WebSocket connection closes. `detail.connection`, `detail.reason`, and `detail.code` describe the close.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxwsclose"
        },
        {
          "name": "ws:error",
          "description": "Fires on WebSocket connection or send errors. `detail.url` and `detail.error` describe the failure.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxwserror"
        },
        {
          "name": "before:ws:request",
          "description": "Fires before sending a WebSocket message. `detail.headers` and `detail.body` are modifiable. Cancel to skip sending.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxbeforewsrequest"
        },
        {
          "name": "after:ws:request",
          "description": "Fires after a WebSocket message is sent. `detail.headers` and `detail.body` contain the sent payload.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxafterwsrequest"
        },
        {
          "name": "before:ws:message",
          "description": "Fires before a WebSocket message is processed. `detail.message.text`, `detail.message.json`, and `detail.message.cancelled` are available.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxbeforewsmessage"
        },
        {
          "name": "after:ws:message",
          "description": "Fires after a WebSocket message is processed. `detail.message.text` and `detail.message.json` are available.",
          "doc-url": "https://four.htmx.org/extensions/hx-ws#htmxafterwsmessage"
        },
        {
          "name": "download:start",
          "description": "Fires when download response headers are received. `detail.total` is the content length or `null`.",
          "doc-url": "https://four.htmx.org/extensions/hx-download#events"
        },
        {
          "name": "download:progress",
          "description": "Fires for each download chunk. `detail.loaded`, `detail.total`, and `detail.percent` describe progress.",
          "doc-url": "https://four.htmx.org/extensions/hx-download#events"
        },
        {
          "name": "download:complete",
          "description": "Fires after a file download is triggered in the browser. `detail.filename` and `detail.size` describe the downloaded blob.",
          "doc-url": "https://four.htmx.org/extensions/hx-download#events"
        },
        {
          "name": "before:head:merge",
          "description": "Fires before the hx-head extension processes response `<head>` content. `detail.ctx` is the request context.",
          "doc-url": "https://four.htmx.org/extensions/hx-head#htmxbeforeheadmerge"
        },
        {
          "name": "before:head:add",
          "description": "Fires before the hx-head extension adds a new head element. `detail.headElement` is the element. Cancel to skip it.",
          "doc-url": "https://four.htmx.org/extensions/hx-head#htmxbeforeheadadd"
        },
        {
          "name": "before:head:remove",
          "description": "Fires before the hx-head extension removes a head element. `detail.headElement` is the element. Cancel to keep it.",
          "doc-url": "https://four.htmx.org/extensions/hx-head#htmxbeforeheadremove"
        },
        {
          "name": "after:head:merge",
          "description": "Fires after the hx-head extension merges head content. `detail.added`, `detail.kept`, and `detail.removed` list affected elements.",
          "doc-url": "https://four.htmx.org/extensions/hx-head#htmxafterheadmerge"
        },
        {
          "name": "history:cache:before:save",
          "description": "Fires before the history-cache extension saves the current page. Cancel or set `detail.cancelled` to skip saving.",
          "doc-url": "https://four.htmx.org/extensions/hx-history-cache#events"
        },
        {
          "name": "history:cache:after:save",
          "description": "Fires after the history-cache extension saves the current page.",
          "doc-url": "https://four.htmx.org/extensions/hx-history-cache#events"
        },
        {
          "name": "history:cache:miss",
          "description": "Fires when the requested history entry is not in the cache. Set `detail.refreshOnMiss = true` to force a full reload.",
          "doc-url": "https://four.htmx.org/extensions/hx-history-cache#events"
        },
        {
          "name": "history:cache:hit",
          "description": "Fires when a cache entry is found. Cancel to bypass the cache and let core fetch from the server.",
          "doc-url": "https://four.htmx.org/extensions/hx-history-cache#events"
        },
        {
          "name": "history:cache:before:restore",
          "description": "Fires before cached content is restored. `detail.head` may be changed and `detail.ready` may delay the restore.",
          "doc-url": "https://four.htmx.org/extensions/hx-history-cache#events"
        },
        {
          "name": "history:cache:after:restore",
          "description": "Fires after cached content is restored. `detail.item` is the restored cache item.",
          "doc-url": "https://four.htmx.org/extensions/hx-history-cache#events"
        },
        {
          "name": "security:strip",
          "description": "Fires when the CSP extension strips htmx attributes from an element. `detail.reason` and `detail.stripped` describe the action.",
          "doc-url": "https://four.htmx.org/extensions/hx-csp#security-events"
        },
        {
          "name": "security:violation",
          "description": "Fires when the CSP extension blocks an unsafe htmx action. `detail.reason` describes the violation.",
          "doc-url": "https://four.htmx.org/extensions/hx-csp#security-events"
        },
        {
          "name": "prompt",
          "description": "Fires after the prompt extension receives an answer. `detail.prompt` is the answer and `detail.target` is the target. Cancel to abort.",
          "doc-url": "https://four.htmx.org/extensions/hx-prompt#htmxprompt-event"
        }
      ]
    }
  }
}
