jrief / django-websocket-redis

Websockets for Django applications using Redis as message queue
http://django-websocket-redis.awesto.com/
MIT License
895 stars 222 forks source link

Refactor ws4redis.js #287

Open aitanadev opened 5 years ago

aitanadev commented 5 years ago

Refactor to ES6

DanBrink91 commented 4 years ago

this is great, removing the need to include jquery (or anything else like it) in the project. 👍

jrief commented 4 years ago

Even though untested, this is a great pull request! However, how do you see the problem of not supporting ES5 anymore? Wouldn't it be rather better to offer both version and/or offering a precompiled one. I'm unsure how many browsers support websocket, but do not offer ES6 support. Are there any numbers?

aitanadev commented 2 years ago

Thank you!

websockets/ES6 support is the same 96%

https://caniuse.com/?search=es6

https://caniuse.com/?search=websockets

Partially incomplete IE11 support does not affect this commit, so full browser support is identical.

imagen imagen

Perhaps it is possible to keep the current version as ws4redis.es5.js?

aitanadev commented 2 years ago

Something like:

Additionally, I can make another independent PR for the ws4redis.es5.js version, eliminating the need for jquery only.