mpetazzoni/sse.js

readystatechange

Closed this issue · 4 comments

version 1.0.0

state from -1 to 0 or 1, this version can't change...

Hi @wkylin ,

Sorry I'm not sure I understand the issue you are facing. Can you share more details?

Thanks!

readystatechange: to notify of a change in the ready state of the event source.

const source = new SSE('')
source.addEventListener('readystatechange', handleReadyStateChange)
const handleReadyStateChange = (e) => {
console.log(e.readyState)
// here can't change 0 to 1
}

this.INITIALIZING = -1;
this.CONNECTING = 0;
this.OPEN = 1;
this.CLOSED = 2;

ooo I know. start: true or false....