WindowOrWorkerGlobalScope接口属性:isSecureContext

2018-03-21 15:31 更新

isSecureContext属性

在你使用此功能之前,请仔细检查浏览器兼容性表。

WindowOrWorkerGlobalScope 接口的 isSecureContext 只读属性返回一个布尔值,指示当前上下文是安全的(true)还是不安全的(false)。

isSecureContext属性句法

var isItSecure = self.isSecureContext; //或者只是isSecureContext

isSecureContext属性

isSecureContext 只读属性的值为一个 Boolean。

规范

规范状态注释
Secure Contexts
该规范中的'WindowOrWorkerGlobalScope.isSecureContext'的定义。
Candidate Recommendation
初始定义。

浏览器兼容性

我们正在将兼容性数据转换为机器可读的JSON格式。

  • 电脑端
特征Chrome
Firefox(Gecko)
Internet Explorer
Opera
Safari
基本支持支持:55支持:52
  • 移动端

特征Android WebviewChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
基本支持支持:55支持:55支持:52???
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号