diff --git a/index.html b/index.html index 659ac64c..ca9661cb 100644 --- a/index.html +++ b/index.html @@ -756,6 +756,17 @@

[[\DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors) internal method

+

When invoked, the [[\DiscoverFromExternalSource]](origin, options, @@ -778,7 +789,7 @@

  • Let |requests| be |options|'s {{CredentialRequestOptions/digital}}'s {{DigitalCredentialRequestOptions/requests}} member.
  • -
  • If |requests| is empty, [=exception/throw=] a {{TypeError}}. +
  • If |requests| [=list/is empty=], [=exception/throw=] a {{TypeError}}.
  • [=List/For each=] |request| of |requests|:
      @@ -786,15 +797,57 @@

      |request| to a JSON string. [=exception/throw|Re-throw=] any [=exception=]. +
    1. Let |protocol| be |request|'s + {{DigitalCredentialGetRequest/protocol}}. +
    2. +
    3. Optionally, if |protocol| is unknown to the user agent, + [=exception/throw=] a {{TypeError}}. + +
    4. +
    5. If |protocol| is not supported by the user agent, + [=exception/throw=] a {{"NotSupportedError"}} {{DOMException}}. +
    6. +
    7. If |protocol| is not allowed by the user agent for security + reasons, [=exception/throw=] a {{"SecurityError"}} {{DOMException}}. +
    8. +
    9. If the [=registry/link|specification=] corresponding to + |protocol| defines an IDL [=dictionary=] for [=converted to an idl + value|conversion=]: +
        +
      1. Let |converted| be |request|'s + {{DigitalCredentialGetRequest/data}} [=converted to an idl + value|converted=] to that dictionary. [=exception/throw|Rethrow=] + any exceptions. +
      2. +
      +
    10. +
    11. Otherwise, let |data| be |request|'s + {{DigitalCredentialGetRequest/data}}. +
    12. +
    13. Optionally, validate |data| against any validation rules set + forth in the corresponding [=registry/link|specification=]. If any of + |data|'s members are invalid, [=exception/throw=] a {{TypeError}}. +
  • -
  • - +
  • Let |coordinator| be the [=credential request coordinator=] + associated with |document|'s [=top-level traversable=]. +
  • +
  • Let |signal| be |options|'s {{CredentialRequestOptions/signal}}, if + present. +
  • +
  • Let |result| be the result of awaiting the [=present credential + request UI=] algorithm, passing |document|, |requests|, and |signal|. +
  • +
  • If |result| is an [=exception=], [=exception/throw=] that exception.
  • -
  • Return a {{DigitalCredential}}. +
  • Return |result|.