A Datastar toolchain for Kotlin.
Datastar lives in strings your compiler never reads. Streamlord checks them anyway: in your editor as you type, when the event is built, and before a byte reaches the browser. Ktor and Spring included.
get("/feed") {
call.respondDatastar {
patchElements(selector = "#feed", mode = ElementPatchMode.APPEND) {
li { +"A new head hangs on the wall" }
}
patchSignals("heads" to 13)
}
} The elders of Bonereach asked Gorvek what a warrior wants of a stream.
"That it flows when I say flow. That it stops when I say stop. That it carries my will to the far shore, and nothing else."
"And the JavaScript?"
"I do not know the word."