Credential: type 属性

Baseline 已广泛支持

此功能已成熟,并可在多种设备和浏览器版本上使用。自 2019 年 9 月以来,它已在各种浏览器中可用。

安全上下文: 此功能仅在安全上下文(HTTPS)中可用,且支持此功能的浏览器数量有限。

typeCredential 接口的一个只读属性,它返回一个字符串,包含凭证的类型。有效值包括 passwordfederatedpublic-keyidentityotp

一个字符串,包含给定凭证的名称。

规范

规范
Credential Management Level 1
# dom-credential-type

浏览器兼容性