DatastarEvent
Inheritors
Types
The datastar-execute-script event is used to execute JavaScript in the browser. The autoRemove line determines whether to remove the script after execution. Each attributes line adds an attribute (in the format name value) to the script element. Each script line contains JavaScript to be executed by the browser.
The datastar-merge-fragments event is used to merge HTML fragments into the DOM. The fragments line should be a valid HTML fragment. The selector line should be a valid CSS selector. The mode line determines how the fragments are merged into the DOM. The useViewTransition line determines whether to use a view transition. The settleDuration line determines how long the transition should take.
The datastar-merge-signals event is used to update the store with new values. The onlyIfMissing line determines whether to update the store with new values only if the key does not exist. The signals line should be a valid data-store attribute. This will get merged into the store.
The datastar-remove-fragments event is used to remove HTML fragments that match the provided selector from the DOM.
The datastar-remove-signals event is used to remove signals that match the provided paths from the store.