--- title: CredentialsContainer slug: Web/API/CredentialsContainer translation_of: Web/API/CredentialsContainer ---
{{SeeCompatTable}}{{APIRef("Credential Management API")}}
Credential Management API 的 CredentialsContainer
接口提供了请求 credentials 和通知用户代理(当成功登陆或登出事件发生时)的方法。可通过 Navigator.credentials
获得该接口。
None.
None.
返回一个带有处理值 Credential
(若它能够使用提供的选项创建的话)的 Promise
,或返回 null
(若不能创建 Credential
)。在特殊情况下,返回的 Promise
对象可能 reject。
null
of no Credential
object can be created.requireUserMediation()
. See {{anch("Browser compatibility")}} for support details.// TBD
Specification | Status | Comment |
---|---|---|
{{SpecName('Credential Management')}} | {{Spec2('Credential Management')}} | Initial definition. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support |
{{CompatChrome(51)}} |
{{CompatUnknown}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} |
create() |
{{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} |
requireUserMediation() renamed preventSilentAccess() |
{{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} |
Feature | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support |
{{CompatChrome(51)}} |
{{CompatChrome(51)}} |
{{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} |
create() |
{{CompatChrome(60)}} | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} |
requireUserMediation() renamed preventSilentAccess() |
{{CompatChrome(60)}} | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} |