Make note of syntax for using multiple extensions

This commit is contained in:
GavinRay97 2020-05-27 23:11:41 -04:00 committed by GitHub
parent 6e0895c901
commit e5db6ebe4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,12 @@ To use an extension you use the [hx-ext](/attributes/hx-ext) attribute:
Note that the `hx-ext` tag may be placed on parent elements if you want a plugin to apply to an entire swath of the dom,
and on the `body` tag for it to apply to all htmx requests.
**Tip:** To use multiple extensions on one element, separate them with a comma:
```html
<button hx-post="/example" hx-ext="debug json-enc">This Button Uses Two Extensions</button>
```
## <a name="included"></a> [Included Extensions](#included)
The following extensions that are tested and distributed with htmx:
@ -63,4 +69,4 @@ Extensions can override the following default extension fields:
handleSwap : function(swapStyle, target, fragment, settleInfo) {return false;},
encodeParameters : function(xhr, parameters, elt) {return null;}
}
```
```