SocketCluster / socketcluster-client

JavaScript client for SocketCluster
MIT License
292 stars 91 forks source link

Function expected error in (sc1) socketcluster.js #13

Closed ghost closed 6 years ago

ghost commented 9 years ago

Error stack in ie8: Message: Function expected Line: 545 Char: 1 Code: 0 URI: http://192.168.225.158/socketcluster.js

Message: 'socketCluster' is undefined Line: 74 Char: 5 Code: 0 URI: http://192.168.225.158/

While loading sc1 myapp example in ie8. We want our application to support ie8 socket long polling functionality, however client library don't seem to work.

I have used npm -g install sc1 and sc1 create myApp commands to create sample app. And running python simple server at port inside public folder 80. Also running node server.js at app folder level.

jondubois commented 9 years ago

@investis-webcast Thanks for reporting this. I was able to reproduce the issue in IE8. It looks like it might be related to Browserify.

Right now we're using browserify -s socketCluster index.js > socketcluster.js to create a standalone build - This should expose a socketCluster object but it doesn't appear to be doing that.

Maybe you should try building it yourself using a different tool like https://github.com/webpack/webpack

Also, note that there was an inaccuracy in the docs about SC2 and SC1 being fully compatible with one another (this used to be true until not so long ago). SC2 is still backwards compatible with SC1 but not forwards compatible - I updated the docs on the website to reflect this - The main difference at the moment is authentication.

I wish I could offer better compatibility for SC1 but my focus now is on SC2 - Keeping the two projects in perfect sync has proven to be very time consuming.