stomp-js / stomp-websocket

Stomp client for Web browsers and node.js apps
https://stomp-js.github.io/stomp-websocket/
Apache License 2.0
141 stars 36 forks source link

Add closeEventCallback to expose the websocket CloseEvent so that the #23

Closed dillon-sellars closed 6 years ago

dillon-sellars commented 6 years ago

I have a use case where I need to access the websocket CloseEvent and do things like if (closeEvent.code === 1008).... This PR adds an closeEventHandler that passes along the CloseEvent from the @ws.onclose handler.

kum-deepak commented 6 years ago

Looks all good, I will merge it. Will it be possible to add to docs. If not I will add those.

Many thanks!

dillon-sellars commented 6 years ago

Hi Deepak,

Thanks for the quick response and for keeping this library updated. I'll add something to the docs.

kum-deepak commented 6 years ago

One step I have missed in Contribut.md - before committing your next change set, please run cake build. It will update generated files (JS, minified JS, HTML docs).

I will update the documentation later.

dillon-sellars commented 6 years ago

Updated -- also took a stab at cleaning up _parseConnect by handling all the special cases first.

kum-deepak commented 6 years ago

Great!

kum-deepak commented 6 years ago

Planning for next version of stompjs is on the way. Your participation will be really appreciated, please join at https://github.com/stomp-js/stompjs/issues/1