summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/credential-management/support/federatedcredential-get.html
blob: 476f32688f91cede949edf2a1e650ef573525bd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script>
  navigator.credentials.get({ 'federated': { 'providers': ['https://example.com' ] } })
    .then(c => {
      window.parent.postMessage({
        "status": "resolved",
        "credential": c,
        "exception": null
      }, "*");
    })
    .catch(omg => {
      window.parent.postMessage({
        "status": "rejected",
        "credential": null,
        "exception": omg.name
      }, "*");
    });
</script>