Warning
This update contains breaking changes to the Datastar SSE events.
Added
- Added the ability to send multiple top-level elements in a single fragment. Datastar will handle each one as its own HTML fragment.
- Added the
datastar-delete
event that deletes all elements matching the provided selector. - Added the
datastar-redirect
event that redirects the page to the provided URI. - Added the
datastar-console
event that outputs a message to the browser console.
Changed
- The
datastar-signal
event now acceptsdata: ifmissing true
to update the store with new values only if the key does not exist.
Removed
- Removed the
datastar-signal-ifmissing
event. Use thedatastar-signal
event instead, passing indata: ifmissing true
. - Removed the restriction on
data-model
allowed elements. Should now work with any web component that implements avalue
prop and anoninput
event