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

readyState values are not defined on EventSource instance #66

Closed
kalitine opened this issue Jan 12, 2017 · 0 comments
Closed

readyState values are not defined on EventSource instance #66

kalitine opened this issue Jan 12, 2017 · 0 comments
Labels

Comments

@kalitine
Copy link

CONNECTING, OPEN, CLOSED constants are not defined on the new EventSource(...) object.

EventSource.CONNECTING === 0  // true
EventSource.OPEN === 1  // true
EventSource.CLOSED === 2  // true

Which is what expected, but not the following:

let es = new EventSource(url)
es.CONNECTING === undefined  // true
es.OPEN === undefined  // true
es.CLOSED === undefined  // true

I have not found details about this in the specification, but in Firefox 50.1.0 and Chrome 57 it works. Comparing to WebSocket API, it also works the same way in the browsers.

@rexxars rexxars added the Bug label Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants