CodeByZach / pace

Automatically add a progress bar to your site.
https://codebyzach.github.io/pace/
MIT License
15.65k stars 1.91k forks source link

Use with websockets #524

Open ghost opened 3 years ago

ghost commented 3 years ago

How can i use Pace with websocket calls? Is see there is a SocketRequestTracker in the code but dont understand how it is supposed to work. Just using start() on the beginning of a request and stop() when finished does not work either, it finishes instantly.

Maybe with EventLags? But from the doc i also dont see how this is working. I can start Events which a re checked per interval - checked for what?

Simple requirement would be to tell pace when a request starts and stops. Advanced nice to have would be to send progress through the socket and tell pace like Pace.setProgress(20); or so.

How would you suggest to handle this with pace?