integrity
只读特性在
Request
interface contains the
subresource integrity
value of the request.
var myIntegrity = request.integrity;
subresource integrity
value of the request (e.g.,
sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=
).
If an integrity has not been specified, the property returns
''
.
In the following snippet, we create a new request using the
Request.Request()
constructor (for an image file in the same directory as the script), then save the request
integrity
value in a variable:
var myRequest = new Request('flowers.jpg');
var myIntegrity = myRequest.integrity;
| 规范 | 状态 | 注释 |
|---|---|---|
|
Fetch
The definition of 'integrity' in that specification. |
实时标准 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
integrity
|
Chrome 46 | Edge 14 | Firefox Yes | IE No | Opera Yes | Safari No | WebView Android No | Chrome Android 46 | Firefox Android No | Opera Android Yes | Safari iOS No | Samsung Internet Android 5.0 |
完整支持
不支持
实验。期望将来行为有所改变。
Request