It may be useful to send custom actions by turbo streams like this:
<turbo-stream action="reload" target="frame_id">
which I'm currently using for reloading frames with an src attribute as response to certain actions.
So far this is the only case I had to implement but, in order to avoid an overload of possible new stream actions, I think a small implementation where turbo receives a stream with a custom action and triggers an custom event over the target element can make a difference covering any possible case.
It may be useful to send custom actions by turbo streams like this:
<turbo-stream action="reload" target="frame_id">
which I'm currently using for reloading frames with an
src
attribute as response to certain actions.So far this is the only case I had to implement but, in order to avoid an overload of possible new stream actions, I think a small implementation where turbo receives a stream with a custom action and triggers an custom event over the target element can make a difference covering any possible case.
target_element.dispatchEvent(new CustomEvent('action_name'))
It is just an idea!