question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion for SSE extension syntax

See original GitHub issue

We’re moving SSE support into an extension (so it was decreed by @1cg). This thread is to collect suggestions/feedback on the syntax that we use in the new code. I’m just getting started now, so please let me know if I’m missing anything, or if there’s something we should add. Now is the time 😃

I think we should keep it as close to the existing syntax as possible, which should make it easier to migrate to the new code. Here’s my first pass:


<div hx-ext="sse" sse-url="/my-first-event-source" sse-swap="message">
    INDIVIDUAL SUBSCRIPTION: I will be swapped whenever an unnamed message is received
</div>

<div hx-ext="sse" sse-url="/my-second-event-source" sse-swap="event1">
    INDIVIDUAL SUBSCRIPTION: I will be swapped whenever a message named "event1" is received
</div>

<div hx-ext="sse" sse-url="/my-third-event-source">
    SHARED SUBSCRIPTION:
    Nothing will happen to THIS div, but its children will listen to messages instead.

    <div hx-ext="sse" sse-swap="message">
        I will be swapped whenever an unnamed message is received
    </div>

    <div hx-ext="sse" sse-swap="event1">
        I will be swapped whenever a message named "event1" is received
    </div>

</div>


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
1cgcommented, Oct 15, 2021

for configuration options, I don’t mind if extensions add their own to the standard object, so long as it is documented clearly

for events, I like triggering a real event, so long as it is backwards compatible

1reaction
1cgcommented, Oct 15, 2021

I like injecting htmx (or a wrapper around its internals, maybe an extension API object?) into the extension.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server Side Extension (SSE) Limitation - Qlik Community
Solved: Hi folks, I've started to use server side extensions to allow my Qlik Sense apps to access a REST API and manipulate...
Read more >
Simple Sharing Extensions (SSE) | XML Reference Guide
The purpose of SSE is to add information to an RSS feed (or, as stated in the spec, an OPML outline) that enables...
Read more >
How to Write Fast Code SIMD Vectorization
How to use SIMD Vector Extensions? □ Prerequisite: fine grain parallelism. □ Helpful: regular algorithm structure. □ Easiest way: use ...
Read more >
Generating Fractals with SSE/SSE2 - CodeProject
... and Julia sets using Intel's Streaming SIMD Extensions (SSE, SSE2). ... because it is tiny, fast, and has a rich macro syntax....
Read more >
SPARQL S-Expressions (or "SPARQL Syntax Expressions")
SSE Comments. # or ; introduce comments, which run to the end of line, including the end-of-line characters.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found