Had another thought just now. What if the phx-custom-events
attribute took a value that could be:
- An event name like
MyCustomEvent
would cause phoenix to listen for the event and push it up the channel - An event name and handle_event name separated by
:
egMyCustomEvent:custom_event
would cause it to listen for the DOM custom eventMyCustomEvent
but send it to LV ascustom_event
- A comma separated list of the above
This would mean we only have a single attribute to look for, and the usage is a tad less onerous.