docs: update wg-basic/业务功能/sse
This commit is contained in:
parent
e573209c2c
commit
6df1a10f9e
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user