hx-ext

hx-ext 属性为元素及其所有子元素启用 htmx 扩展

该值可以是单个扩展名,也可以是应用的扩展名的逗号分隔列表。

如果希望插件应用于 DOM 的整个区域,则可以在父元素上放置 hx-ext 标签,并将其放在 body 标签上,以将其应用于所有 htmx 请求。

说明

<div hx-ext="example">
  "Example" extension is used in this part of the tree...
  <div hx-ext="ignore:example">
    ... but it will not be used in this part.
  </div>
</div>