fetch-event-source
fetch-event-source copied to clipboard
Makes FetchEventSource compatible with webworker
Hello,
these changes (somehow similar to https://github.com/Azure/fetch-event-source/pull/8) are the minimal ones I had to do to get FetchEventSource working in a web worker context. I've also added some unit tests to validate these changes.
With it one can use FetchEventSource in a WebWorker by settings these parameters :
fetchEventSource('https://myurl', {
openWhenHidden: true,
fetch: self.fetch,
.....