Atmosphere/atmosphere — Issue #46: jquery.atmosphere.js cosmetic change websocket.onopen
Author: GerjanOnline
Created: 2011-10-26 15:00:58+00:00
State: open

Please change:

websocket.onopen = function(message) {
jQuery.atmosphere.debug("Websocket successfully opened");
webSocketSupported = true;
jQuery.atmosphere.response.state = 'opening';
jQuery.atmosphere.invokeCallback(jQuery.atmosphere.response);

if (jQuery.atmosphere.request.method == 'POST') {
data = jQuery.atmosphere.request.data;
jQuery.atmosphere.response.state = 'messageReceived';
websocket.send(jQuery.atmosphere.request.data);
}
};

to

websocket.onopen = function() {
jQuery.atmosphere.debug("Websocket successfully opened");
webSocketSupported = true;
jQuery.atmosphere.response.state = 'opening';
jQuery.atmosphere.invokeCallback(jQuery.atmosphere.response);

if (jQuery.atmosphere.request.method == 'POST') {
jQuery.atmosphere.response.state = 'messageReceived';
websocket.send(jQuery.atmosphere.request.data);
}
};