Frage

Server Sent Events seem like a prime candidate for a jQuery plug-in. Page 921 of JavaScript, the Definitive Guide shows how to use EventSource. But then page 923 says that IE uses attachEvent instead of addEventListener.

I found jQuery.EventSource on github, but there's no mention of attachEvent. It instead falls back to using $.ajax.

Q: If I'm going to use the EventSource feature of JavaScript, should I use jQuery.EventSource?

I gotta have more jQuery!

War es hilfreich?

Lösung

As of today IE9 doesn't support EventSource (Server Sent Events). In the good article by Remy Sharp, there is at the end of the article a list of polyfill solutions.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top