error()
方法在
响应
interface returns a new
响应
object associated with a network error.
注意
: This is mainly relevant to
ServiceWorkers
; the error method is used to return an error if you so wish it. An error response has its
type
设为
error
.
注意
: An "error"
响应
never really gets exposed to script: such a response to a
fetch()
would reject the promise.
var errorResponse = Response.error();
None.
A
响应
对象。
TBD (does not yet appear to be supported anywhere).
| 规范 | 状态 | 注释 |
|---|---|---|
|
Fetch
The definition of 'error()' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
error
|
Chrome Yes | Edge 16 | Firefox Yes | IE No | Opera Yes | Safari Yes | WebView Android No | Chrome Android No | Firefox Android No | Opera Android No | Safari iOS No | Samsung Internet Android No |
完整支持
不支持
实验。期望将来行为有所改变。
响应