From 6df1a10f9eebaca4c3707af19e0745f8f4b5724a Mon Sep 17 00:00:00 2001 From: Administrator <450292408@qq.com> Date: Mon, 1 Nov 2021 08:40:23 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20update=20wg-basic/=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD/sse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wg-basic/业务功能/sse.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wg-basic/业务功能/sse.md b/wg-basic/业务功能/sse.md index 4740bf1..410dc87 100644 --- a/wg-basic/业务功能/sse.md +++ b/wg-basic/业务功能/sse.md @@ -2,7 +2,7 @@ title: SSE description: 服务端事件 published: true -date: 2021-11-01T08:40:00.487Z +date: 2021-11-01T08:40:22.257Z tags: wg-basic editor: markdown dateCreated: 2021-11-01T08:40:00.487Z @@ -47,6 +47,10 @@ public void push(HttpServletRequest request, HttpServletResponse response) { ``` # 页面 + +> IE不支持EventSource,可以使用WebSocket代替 +{.is-warning} + ```javascript // 判断是否支持 if ('EventSource' in window) { @@ -72,5 +76,3 @@ if ('EventSource' in window) { } ``` -> IE不支持EventSource,可以使用WebSocket代替 -{.is-warning}