Generic events between LiveView and the Javascript side

Hi @derek-zhou - have you read through the JS interop docs at JavaScript interoperability — Phoenix LiveView v1.2.5?

You will need hooks attached to an element in your liveview. The docs referenced above give an example of a hook setting up a listener for window events.