Documentation fix (#890)

This commit is contained in:
Ben Beecher 2022-05-12 18:44:52 -04:00 committed by GitHub
parent 4b5052984b
commit 5b2d1f15c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -108,9 +108,9 @@ Previous versions of htmx used a built-in tag `hx-sse` to implement Server Sent
| Old Attribute | New Attribute | Comments |
|--------------------------------|--------------------------|------------------|
| `hx-sse=""` | `hs-ext="sse"` | Use the `hx-ext="sse"` attribute to install the SSE extension into any HTML element. |
| `hx-sse=""` | `hx-ext="sse"` | Use the `hx-ext="sse"` attribute to install the SSE extension into any HTML element. |
| `hx-sse="connect:<url>"` | `sse-connect="<url>"` | Add a new attribute `sse-connect` to the tag that specifies the URL of the Event Stream. This attribute must be in the same tag as the `hx-ext` attribute. |
| `hs-sse="swap:<EventName>"` | `sse-swap="<EventName>"` | Add a new attribute `sse-swap` to any elements that will be swapped in via the SSE extension. This attribute must be placed **on** or **inside of** the tag containing the `hx-ext` attribute. |
| `hx-sse="swap:<EventName>"` | `sse-swap="<EventName>"` | Add a new attribute `sse-swap` to any elements that will be swapped in via the SSE extension. This attribute must be placed **on** or **inside of** the tag containing the `hx-ext` attribute. |
| `hx-trigger="sse:<EventName>"` | NO CHANGE | any `hx-trigger` attributes do not need to change. The extension will identify these attributes and add listeners for any events prefixed with `sse:` |
### Additional SSE Resources

View File

@ -64,9 +64,9 @@ Previous versions of htmx used a built-in tag `hx-ws` to implement WebSockets.
| Old Attribute | New Attribute | Comments |
|-------------------------|----------------------|-------------------|
| `hx-ws=""` | `hs-ext="ws"` | Use the `hx-ext="ws"` attribute to install the WebSockets extension into any HTML element. |
| `hx-ws=""` | `hx-ext="ws"` | Use the `hx-ext="ws"` attribute to install the WebSockets extension into any HTML element. |
| `hx-ws="connect:<url>"` | `ws-connect="<url>"` | Add a new attribute `ws-connect` to the tag that defines the extension to specify the URL of the WebSockets server you're using. |
| `hs-ws="send"` | `ws-send=""` | Add a new attribute `ws-send` to mark any child forms that should send data to your WebSocket server |
| `hx-ws="send"` | `ws-send=""` | Add a new attribute `ws-send` to mark any child forms that should send data to your WebSocket server |
### Source