title: How to handle js loader with ActionCable websockets?
body: <p>So in my application using Rails 5 I have a loader system which caught <code>ajaxSend</code> and <code>ajaxComplete</code> to animate a loader in css.</p>
  
  <pre><code>$(document).bind('ajaxSend', () =&gt; {
    ...
  })
  
  $(document).bind('ajaxComplete', () =&gt; {
    ...
  })
  </code></pre>
  
  <p>My question is simple, how to do the same thing with websockets ? :)</p>