gimite / web-socket-js

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

Firefox version 26 MessageEvent.initMessageEvent is undefined #144

Closed ken107 closed 10 years ago

ken107 commented 10 years ago

Hi, in new version of FF, when an Websocket message incoming from Flash, exception occurs in this function. I not sure how to fix.

WebSocket.prototype.__createMessageEvent = function(type, data) {
    if (document.createEvent && window.MessageEvent && !window.opera) {
      var event = document.createEvent("MessageEvent");
      event.initMessageEvent("message", false, false, data, null, null, window, null);
      return event;
gimite commented 10 years ago

Thanks, marked as duplicate of #142 . It has been fixed in the repository.

ken107 commented 10 years ago

Thanks, i think the fix breaks earlier versions of FF. But the latest version is being pushed out mandatorily so eventually all will be fine i suppose. FF is really losing it

gimite commented 10 years ago

I intended to make it work in the old FF too. Can you let me know why it doesn't work?

ken107 commented 10 years ago

Never mind, sorry, it works good on my computer. Somehow one of my users were having problem.