-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Occasionally, we might need to render confetti outside a user-initiated click.
For example, we might want to render confetti after a user has checked out from an order flow which starts with a POST request to the /orders endpoint.
Currently, to achieve this, we can hijack a hidden link with a follow value set to “false” and display the confetti as we see fit.
This happens because the spray method expects a browser click event where we can obtain the event's clientX and clientY values.
We could modify the behavior to allow for the ability to render confetti on the connect method of the Stimulus controller.
As far as I know, we would have to modify the default behavior so we can render something without the need for a click event.
Do you think that's something that could be useful?