Two small modifications (MessageEvent object + retry field handling)#5
Two small modifications (MessageEvent object + retry field handling)#5xfra35 wants to merge 1 commit intoremy:masterfrom
Conversation
|
The Also the interval value shouldn't be available in the eventsource object as it's internal to our polyfill and shouldn't be exposed to the developer. My gut feeling is the interval retry should be used here https://github.com/xfra35/polyfills/blob/18c85ae81ca905c2fa8255d9f4fff94b31a791d2/EventSource.js#L96 - but definitely needs testing with a server that maybe gets shutdown to test the retry backoff. |
|
"Also the interval value shouldn't be available in the eventsource object as it's internal to our polyfill and shouldn't be exposed to the developer." >> you're totally right. I didn't think about that aspect. I just moved it back as originally (interval variable) and updated the "retry" line accordingly. I made a test with a server shutdown. It kept on trying every 2s (my retry value) and retrieved the connection correctly when the server went back up. Concerning the default polling interval, don't you think 500ms is too short ? I've read somewhere that the usual default polling value is 3000ms although I can't find that value in the w3c specs. |
Hi, I've tested EventSource.js in IE7/8/9 and it works great. Thanks for your work !
I slightly modified the code as follows :
(tested in IE7/8/9)