mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-30 14:31:47 +00:00
parent
560b314074
commit
857095650f
@ -155,6 +155,10 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
||||
}, timeout);
|
||||
}
|
||||
};
|
||||
|
||||
source.onopen = function (evt) {
|
||||
api.triggerEvent(elt, "htmx::sseOpen", {source: source});
|
||||
}
|
||||
|
||||
// Add message handlers for every `sse-swap` attribute
|
||||
queryAttributeOnThisOrChildren(elt, "sse-swap").forEach(function(child) {
|
||||
|
@ -159,6 +159,7 @@ The table below lists all other attributes available in htmx.
|
||||
| [`htmx:pushedIntoHistory`](/events#htmx:pushedIntoHistory) | triggered after an url is pushed into history
|
||||
| [`htmx:responseError`](/events#htmx:responseError) | triggered when an HTTP response error (non-`200` or `300` response code) occurs
|
||||
| [`htmx:sendError`](/events#htmx:sendError) | triggered when a network error prevents an HTTP request from happening
|
||||
| [`htmx:sseOpen`](/events#htmx:sseOpen) | triggered when a SSE source is opened
|
||||
| [`htmx:sseError`](/events#htmx:sseError) | triggered when an error occurs with a SSE source
|
||||
| [`htmx:swapError`](/events#htmx:swapError) | triggered when an error occurs during the swap phase
|
||||
| [`htmx:targetError`](/events#htmx:targetError) | triggered when an invalid target is specified
|
||||
|
Loading…
x
Reference in New Issue
Block a user