Version 0.8 brings basic Datastar support 🚀 #123
stroiman
announced in
Announcements
Replies: 1 comment 2 replies
-
Very cool !! is there an example Datastar project to try it on ? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Version 0.8 is the culmination of the attempt to support Datastar, for which quite a lot of functionality had to be reworked.
fetch
in generalAbortController
andAbortSignal
supportElement.dataset
required implementing named handlers in v8go (should also eventually make it's way to tommie's fork).In the process, many more elegant and idiomatic solutions were discovered (and a few bugs). Go's
context
package is used extensively to control abortion, and internally,AbortSignals
communicate abort through context cancellation.Only the most basic use case works so far
The only working feature so far is an element with a
data-on-click="@get('/datastarapi/events')"
, where the response is morphed into the DOM. There's only just enough to get this scenario working. E.g., onlyGET
requests are supported so far.In fact, the only option that
fetch
supports currently is thesignal
. Noheaders
, nobody
.The ability to simulate user interaction is also very limited so far, only a basic
Click()
function is implemented. You can manually dispatch events from elements, e.g.KeyDown
. It's a planned feature to simulate the user typing some input, automatically dispatchingkeydown
/keyup
/keypress
/input
events in the correct order from an input string.Priority
The priority going forward is further improving
fetch
, but user feedback can affect priorities.Beta Was this translation helpful? Give feedback.
All reactions