docs: update wg-basic/业务功能/sse
This commit is contained in:
parent
e573209c2c
commit
6df1a10f9e
@ -2,7 +2,7 @@
|
|||||||
title: SSE
|
title: SSE
|
||||||
description: 服务端事件
|
description: 服务端事件
|
||||||
published: true
|
published: true
|
||||||
date: 2021-11-01T08:40:00.487Z
|
date: 2021-11-01T08:40:22.257Z
|
||||||
tags: wg-basic
|
tags: wg-basic
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2021-11-01T08:40:00.487Z
|
dateCreated: 2021-11-01T08:40:00.487Z
|
||||||
@ -47,6 +47,10 @@ public void push(HttpServletRequest request, HttpServletResponse response) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
# 页面
|
# 页面
|
||||||
|
|
||||||
|
> IE不支持EventSource,可以使用WebSocket代替
|
||||||
|
{.is-warning}
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// 判断是否支持
|
// 判断是否支持
|
||||||
if ('EventSource' in window) {
|
if ('EventSource' in window) {
|
||||||
@ -72,5 +76,3 @@ if ('EventSource' in window) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
> IE不支持EventSource,可以使用WebSocket代替
|
|
||||||
{.is-warning}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user