gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

regression - does not work in IE8 #61

Closed wulczer closed 13 years ago

wulczer commented 13 years ago

Commit 7414b2e42d1e6e27b1a297caa17f38212a534dd2 introduced a regression with IE. web-socket-js in web_socket.js:164 tries to use document.createEvent, which does not exist in IE. For the moment I just reverted that commit and it started working again. Not sure what kind of compat layer is needed for IE to be able to transparently use events there...

gimite commented 13 years ago

I guess the error is because your code or JavaScript library you use defines Event object even in IE. It works fine for me with IE 8 (testing with sample.html in the library).

I added check of existence of document.createEvent as well as window.Event at: https://github.com/gimite/web-socket-js/commit/bb5797cad5244dc86410e35726ef886bbc49afe9 Hopefully the error in your environment is fixed by this.

wulczer commented 13 years ago

Hm, yes, it might be another library interfering. I'll recheck with the new check added and report back, thanks.