blue-gold-89534
02/24/2022, 1:16 PMhtml
<div hx-ext="sse" sse-connect="/events/" sse-swap="message">
<h1>messages go here</h1>
</div>
I implemented this using django-channels and I can see my sse messages when directly opening my testservers local page for /events/:
event: message
data: {"text": "test was executed"}
event: keep-alive
data:
did I miss anything? I cannot see anything happen with the HTMX part of thingsmysterious-toddler-20573
02/24/2022, 1:29 PMgorgeous-ghost-95789
02/24/2022, 1:33 PMred-farmer-97020
02/24/2022, 4:58 PMgorgeous-ghost-95789
02/24/2022, 5:35 PMbrainy-ice-92385
02/24/2022, 7:07 PMeager-tiger-27508
02/24/2022, 9:19 PMhaskell-htmx? One of my co-workers has taken the htmx pill and we're introducing it to our codebase and I'd like to invite him 🙂 It's great because at my job we use a different framework from what I've been using on my haskell-htmx side projects so there will be material for multiple Haskell web frameworks really soon.handsome-laptop-14449
02/24/2022, 10:30 PMhandsome-laptop-14449
02/24/2022, 10:38 PMmysterious-toddler-20573
02/24/2022, 11:08 PMmysterious-toddler-20573
02/24/2022, 11:08 PMmysterious-toddler-20573
02/24/2022, 11:11 PMgorgeous-airport-54386
02/25/2022, 9:59 AMjs
let count = 0
function el() {
return h`main` (
h`h1.title` `Counter App`,
h`button#increment` ({ onclick() { count++ } }) `Increment`,
h`output` `clicked ${count} times`,
)
}gorgeous-airport-54386
02/25/2022, 10:00 AMcalm-ice-23682
02/25/2022, 10:11 AMgorgeous-airport-54386
02/25/2022, 10:12 AMgorgeous-airport-54386
02/25/2022, 10:12 AMmysterious-toddler-20573
02/25/2022, 1:36 PMgorgeous-airport-54386
02/25/2022, 1:36 PMmysterious-toddler-20573
02/25/2022, 1:36 PMmysterious-toddler-20573
02/25/2022, 1:37 PMmysterious-toddler-20573
02/25/2022, 1:37 PMmysterious-toddler-20573
02/25/2022, 1:38 PMmysterious-toddler-20573
02/25/2022, 1:41 PMlet count = 0
() =>
(main
(h1.title 'Counter App')
(button#increment onclick:{ count++ } "Increment")
(output `clicked ${count} times`))mysterious-toddler-20573
02/25/2022, 1:42 PMmysterious-toddler-20573
02/25/2022, 1:43 PMmysterious-toddler-20573
02/25/2022, 1:43 PMmysterious-toddler-20573
02/25/2022, 1:47 PMhtml
<script tag="my-thing" type="dzkscript">
let count = 0
(main
(h1.title 'Counter App')
(button#increment onclick:{ count++ } "Increment")
(output `clicked ${count} times`))
</script>
<my-thing/>mysterious-toddler-20573
02/25/2022, 1:51 PMdzkscript -> [program_decls]* sexpr-html
program_decls -> 'let' ID '=' expr
...
sexpr-html -> '(' TAG_ID [tag_components]* ')'
...