Readonly
contextStatic
blessingsStatic
outletsStatic
targetsStatic
valuesStatic
shouldReload the browser, bypassing the browser dialog triggered by UnsavedController.
Intentionally does nothing.
Useful for attaching data-action to leverage the built in
Stimulus options without needing any extra functionality.
e.g. preventDefault (:prevent
) and stopPropagation (:stop
).
Trigger a redirect based on the custom event's detail, the Stimulus param or finally check the controlled element for a value to use.
Reload the browser.
Reset the field to a supplied or the field's initial value (default). Only update if the value to change to is different from the current value.
Select all the text in an input or textarea element.
Like post, but uses the Beacon API, which can be used to send data to a server without waiting for a response. Useful for sending analytics data or a "release" signal before navigating away from a page.
Static
after
Adds the ability for an element to activate a discrete action such as clicking the button dynamically from some other event or triggering a form submission where the form is created dynamically in the DOM and then submitted.
Example: - Triggering a click
Example: - Triggering a dynamic POST submission
Example: - Triggering a POST request via sendBeacon
Example: - Triggering a dynamic redirect (a link is normally preferred)
Example: - Triggering selection of the text in a field
Example: - Ensuring a button's click does not propagate