sse.js icon indicating copy to clipboard operation
sse.js copied to clipboard

doesn't work with IE 11

Open ap-81 opened this issue 4 years ago • 2 comments

I am using angular 9. I get a JS error (attached) on IE. My browserslist supports IE 9-11 and the target is set to es5 on tsconfig.json. I've included all the polyfills for IE on polyfill.ts.

Does this library work on IE 11 ?

image

image image image

ap-81 avatar Mar 11 '21 22:03 ap-81

(note, I'm not mpetazzoni)

Can you figure out what code it fails on? I believe that if you have the debugger open you can have it show the line.

wmertens avatar Mar 12 '21 06:03 wmertens

I got this example from an article. stream() method throws the error.

image

ap-81 avatar Mar 12 '21 20:03 ap-81

.stream() isn't part of the original EventSource API. It's only in sse.js to make it easier to setup event listeners before starting the stream and avoid race conditions. But it's not required to use – in fact, it's only required if you explicitly set the start: false option in the SSE constructor.

mpetazzoni avatar Aug 06 '24 19:08 mpetazzoni