fetch-event-source icon indicating copy to clipboard operation
fetch-event-source copied to clipboard

Makes FetchEventSource compatible with webworker

Open stefdev49 opened this issue 2 years ago • 1 comments

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,
    .....

stefdev49 avatar Jul 01 '22 04:07 stefdev49

CLA assistant check
All CLA requirements met.

ghost avatar Jul 01 '22 04:07 ghost