[Pkg-javascript-commits] [sockjs-client] 122/350: Fix message event

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:03:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.

commit 3eb18d8e185cdf963cf18c2785067a025b08a22e
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Fri Oct 10 18:10:21 2014 -0400

    Fix message event
---
 lib/main.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/main.js b/lib/main.js
index 23e534e..7544035 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -4,6 +4,7 @@ require('./shims');
 
 var u = require('url')
   , util = require('util')
+  , JSON3 = require('json3')
   , random = require('./utils/random')
   , escape = require('./utils/escape')
   , origin = require('./utils/origin')
@@ -11,11 +12,11 @@ var u = require('url')
   , InvalidAccessError = require('./error/invalidaccesserror')
   , InvalidStateError = require('./error/invalidstateerror')
   , Event = require('./polyfills/event')
-  , CloseEvent = require('./transport/lib/closeevent')
   , EventTarget = require('./polyfills/eventtarget')
   , loc = require('./polyfills/location')
+  , CloseEvent = require('./transport/lib/closeevent')
+  , TransportMessageEvent = require('./transport/lib/trans-message-event')
   , InfoReceiver = require('./info-receiver')
-  , JSON3 = require('json3')
   ;
 
 var transports;
@@ -200,12 +201,12 @@ SockJS.prototype._transportMessage = function(msg) {
     case 'a':
       payload = JSON3.parse(msg.slice(1) || '[]');
       payload.forEach(function (p) {
-        self._dispatchMessage(p);
+        self._dispatchMessage(new TransportMessageEvent(p));
       });
       break;
     case 'm':
       payload = JSON3.parse(msg.slice(1) || 'null');
-      this._dispatchMessage(payload);
+      this._dispatchMessage(new TransportMessageEvent(payload));
       break;
     case 'c':
       payload = JSON3.parse(msg.slice(1) || '[]');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list