Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also listen to stream events with addEventListener #408

Merged
merged 3 commits into from
Aug 13, 2019
Merged

Also listen to stream events with addEventListener #408

merged 3 commits into from
Aug 13, 2019

Conversation

morleyzhi
Copy link
Contributor

Some EventSource polyfills (like one React Native package) support addEventListener but not onmessage / onerror. It's possible other implementations could use onmessage but not addEventListener. So to be safe, use both.

Morley Zhi added 2 commits August 13, 2019 11:10
Some EventSource polyfills (like one React Native package) support addEventListener but not onmessage / onerror. It's possible another polyfill will use onmessage but not addEventListener. So to be safe, use both.
@morleyzhi morleyzhi changed the title Also listen to stream events with addEventListener [WIP] Also listen to stream events with addEventListener Aug 13, 2019
@morleyzhi
Copy link
Contributor Author

Investigating some issues right now, one sec.

@morleyzhi morleyzhi changed the title [WIP] Also listen to stream events with addEventListener Also listen to stream events with addEventListener Aug 13, 2019
@morleyzhi
Copy link
Contributor Author

Even though this was a real issue I came up against, I'm not sure it's our responsibility to change it. This came about because a polyfill didn't meet spec.

It's probably worth fixing just because addEventListener is better supported, and allows for multiple events instead of one overwriting the other.

@morleyzhi morleyzhi merged commit 658eb4a into stellar:master Aug 13, 2019
@morleyzhi morleyzhi deleted the mz-eventsource branch August 13, 2019 16:16
@abuiles abuiles mentioned this pull request Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants