=sse: multi events
This commit is contained in:
parent
e23ad2cbf2
commit
d9a1837f3b
12 changed files with 15 additions and 15 deletions
|
@ -13,7 +13,7 @@
|
|||
}
|
||||
|
||||
function SSEMsg() {
|
||||
const sse = new EventSource(`/api/sse?event=ping&event=pong`);
|
||||
const sse = new EventSource(`/api/sse?events=ping,pong`);
|
||||
console.log('subscribe ping pong');
|
||||
|
||||
sse.onopen = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue