-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE: Swap HTML on Server Sent Events (like WebSockets) improved version #185
Closed
benpate
wants to merge
11
commits into
bigskysoftware:dev
from
benpate:pullrequest-serverSentEvents-redesign-withMultipleEvents
Closed
FEATURE: Swap HTML on Server Sent Events (like WebSockets) improved version #185
benpate
wants to merge
11
commits into
bigskysoftware:dev
from
benpate:pullrequest-serverSentEvents-redesign-withMultipleEvents
Commits on Aug 15, 2020
-
First pass at making a new SSE interface. SUPPORTS: - New syntax `<div hx-sse="/url EventName" hx-swap="outerHTML" hx-target="somewhere">` DOES NOT SUPPORT: - triggers. Original syntax has been removed. - unnamed events (can't make onmessage work) - connection pooling (required before use) - extra parameters on hx-swap, like: swap, settle, scroll, show (this should *probably* be implemented before use)
Configuration menu - View commit details
-
Copy full SHA for 89ca328 - Browse repository at this point
Copy the full SHA 89ca328View commit details -
This may match the spec: https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events-intro ``` The default event type is "message". ```
Configuration menu - View commit details
-
Copy full SHA for 4047494 - Browse repository at this point
Copy the full SHA 4047494View commit details
Commits on Aug 16, 2020
-
Merge pull request #1 from tomberek/patch-1
Adding default “message” eventType if none is specified. This matches the specifications Tom provided from the WHATWG.
Configuration menu - View commit details
-
Copy full SHA for 25db559 - Browse repository at this point
Copy the full SHA 25db559View commit details -
Support multiple listeners on a single EventSource
Following through on part 1 of #155 (comment)
Configuration menu - View commit details
-
Copy full SHA for d319161 - Browse repository at this point
Copy the full SHA d319161View commit details -
First pas at EventSource pooling
- "works" with limited testing. - Adding/Removing EventSources to/from the pool works correctly. - Events coming through to page correctly. - Much testing, cleanup, and code style needed. - Haven't yet tested multiple SSEs on a single page.
Configuration menu - View commit details
-
Copy full SHA for aab9c25 - Browse repository at this point
Copy the full SHA aab9c25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c7e4eb - Browse repository at this point
Copy the full SHA 7c7e4ebView commit details -
This is a first draft of a better kind of connection pooling. Since the number of connections is unlikely to grow very large, it seems easier and more efficient to just put them all into one array, and scan through it whenever we need. This enables a new function `auditEventListeners` which verifies that the (probably < 4) remote connections are still supporting active DOM nodes, and saves us the extra work of walking an entire sub-tree hunting for them. I think this same structure could save us even more work if applied to WebSockets, too. But, that effort should wait until we've confirmed that we like this for SSE.
Configuration menu - View commit details
-
Copy full SHA for 52250d9 - Browse repository at this point
Copy the full SHA 52250d9View commit details
Commits on Aug 17, 2020
-
- rewriting connection sharing to use a single array instead of a more complicated map of urls/connections.
Configuration menu - View commit details
-
Copy full SHA for f792295 - Browse repository at this point
Copy the full SHA f792295View commit details -
Initial test using Tom's doSwap function
This is much more comprehensive than my original `handleContent` function. Still more work required to verify that this is handling all of the features we need, and then backport it into WebSocket handlers and AJAX handlers.
Configuration menu - View commit details
-
Copy full SHA for 5b9c471 - Browse repository at this point
Copy the full SHA 5b9c471View commit details
Commits on Sep 4, 2020
-
Sorry these are all manual cases. If someone has suggestions on how to make these automated, I'm happy to improve them.
Configuration menu - View commit details
-
Copy full SHA for f10bbe2 - Browse repository at this point
Copy the full SHA f10bbe2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02a7235 - Browse repository at this point
Copy the full SHA 02a7235View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.