diff --git a/index.html b/index.html index 60cd381..b462280 100644 --- a/index.html +++ b/index.html @@ -976,8 +976,8 @@

The InteractionOutput interface

  • If |this|.|data| is not a {{ReadableStream}} or if - |dataUsed| is `true`, or if |form| is not an {{object}} or if |schema| or its - |type| are `null` or `undefined`, then + |dataUsed| is `true`, or if |form| is not an {{object}} or if |schema| + is `null` or `undefined`, then [=reject=] |promise| with {{NotReadableError}} and stop.
  • @@ -1057,6 +1057,30 @@

    The InteractionOutput interface

    The check data schema algorithm

    To run the check data schema steps on |payload| and |schema:object|,
      +
    1. + If |schema| is `null` or `undefined`, return `undefined`. +
    2. +
    3. + If |schema|.|const| is not |undefined| and |schema|.|const| does not equal |payload|, throw {{TypeError}} and stop. +
    4. +
    5. + If |schema|.|enum| is not |undefined| and none of the elements in + |schema|.|enum| equal |payload|, throw {{TypeError}} and stop. +
    6. +
    7. + Let |oneOf| be |schema|.|oneOf|. + If |oneOf| is not |undefined|, +
        +
      1. + For each |subSchema| in |oneOf|, run the check data schema + steps on |payload| and |subSchema|. +
      2. +
      3. + If none or more than one of these runs do not throw, throw + {{TypeError}} and stop. +
      4. +
      +
    8. Let |type| be |schema|.|type|.