Skip to content

Commit c731886

Browse files
authored
feat: add response header to open event
sometime we need get data from response header, now we can do it.
1 parent d64b51a commit c731886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EventSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class EventSource {
108108
if (xhr.status >= 200 && xhr.status < 400) {
109109
if (this.status === this.CONNECTING) {
110110
this.status = this.OPEN;
111-
this.dispatch('open', { type: 'open' });
111+
this.dispatch('open', { type: 'open' , responseHeaders: xhr.responseHeaders });
112112
this._logDebug('[EventSource][onreadystatechange][OPEN] Connection opened.');
113113
}
114114

0 commit comments

Comments
 (0)