taoensso / sente

Realtime web comms library for Clojure/Script
https://www.taoensso.com/sente
Eclipse Public License 1.0
1.74k stars 194 forks source link

nodejs: call to undefined addEventListener causing problems #448

Closed bwalex closed 1 month ago

bwalex commented 5 months ago

https://github.com/taoensso/sente/blob/102c5b0b2ca8e1ce931655f146d770287f4a1b8b/src/taoensso/sente.cljc#L1353

This bit of code unconditionally calls the global addEventListener in all ClojureScript environments, including node.js. I use Sente as a server in a nodejs environment, all compiled with shadow-cljs - if that makes any difference. I'm currently on 1.16.2, and tried to update to 1.19.2, which is how I ran into it.

ptaoussanis commented 5 months ago

@bwalex Hi Alex- thanks for the report. PR welcome to exclude this behaviour from Node.js, otherwise I'll take care of this next time I'm on batched Sente work 👍

ptaoussanis commented 1 month ago

I believe this should be addressed by https://github.com/taoensso/sente/pull/453, which I'm merging now