Skip to content

Conversation

@mone
Copy link
Contributor

@mone mone commented Jul 25, 2013

...vents following the first one.

Hi,

I noticed that multiple LOADING events were filtered out instead of being forwarded to listeners of onreadystatechange.
I'm not actually sure the multiple "LOADING" event is part of the W3C specs but you can see it working on most browsers (at least Firefox Chrome Safari and IE starting from IE10)

e.g.: try this:

var XHRClass = typeof XMLHttpRequest != "undefined" ? XMLHttpRequest : require("xmlhttprequest").XMLHttpRequest;  
var xhr = new XHRClass();
xhr.onreadystatechange = function() {
  console.log("State: " + this.readyState);
};
xhr.open("GET", "http://push.lightstreamer.com/lightstreamer/create_session.js?LS_client_version=5.0&LS_adapter_set=DEMO&LS_keepalive_millis=1000");
xhr.send();

My pull request contains the very small fix and a test derived from test-events (I should have probably stripped more stuff from the original test, let me know if you want me to)

let me know your thoughts,
Bye.

driverdan added a commit that referenced this pull request Jun 17, 2014
introduce support for http-streaming by not filtering multiple LOADING e...
@driverdan driverdan merged commit a18c126 into driverdan:master Jun 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants