Closed sbrow closed 9 months ago
The htmx docs for HX-Trigger state that events can be strings, but can also be any JSON serializable value.
Would you be open to a PR in this regard?
Example
Input:
with(new HtmxResponse())->addTrigger('showMessage', ['level' => 'info', 'message', 'Here Is A Message'])
Output:
HX-Trigger: {"showMessage":{"level" : "info", "message" : "Here Is A Message"}}
What would happen if you call addTrigger with the same event name twice is up for debate.
addTrigger
The htmx docs for HX-Trigger state that events can be strings, but can also be any JSON serializable value.
Would you be open to a PR in this regard?
Example
Input:
Output:
What would happen if you call
addTrigger
with the same event name twice is up for debate.