=sse: multi events

This commit is contained in:
Miki 2023-12-20 13:31:38 +01:00
parent e23ad2cbf2
commit d9a1837f3b
12 changed files with 15 additions and 15 deletions

View file

@ -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 = () => {