diff --git a/source b/source index 99e0b90f80b..188db27fbfe 100644 --- a/source +++ b/source @@ -2783,6 +2783,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • the RequestCredentials enumeration
  • the RequestDestination enumeration
  • the fetch() method
  • +
  • consume body
  • response and its @@ -3122,6 +3123,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

    User agents that support JavaScript must also implement the BigInt proposal.

    + +

    User agents that support JavaScript must also implement the JavaScript standard library proposal. + The following terms are defined there, and used in this specification:

    + @@ -86768,7 +86777,7 @@ interface ApplicationCache : EventTarget {
    Definitions
    -

    A script is one of two possible A script is one of three possible structs. All scripts have:

    @@ -86781,7 +86790,9 @@ interface ApplicationCache : EventTarget {

    Either a Script Record, for classic scripts; a Source Text Module Record, for module scripts; or null. In the former two cases, it represents a parsed script; + script">module scripts; a Synthetic Module Record for JSON module scripts; or null. In the + former two cases, it represents a parsed script; in the third case, a parsed JSON document; null represents a failure parsing.

    A parse @@ -86834,6 +86845,10 @@ interface ApplicationCache : EventTarget { data-x="concept-script">script. It has no additional items.

    +

    A JSON module script is another type of script. It has no additional items.

    +

    The active script is determined by the following algorithm:

      @@ -87472,25 +87487,57 @@ interface ApplicationCache : EventTarget {
    1. response's status is not an ok status

    2. + + -
    3. -

      The result of extracting a MIME type from - response's header list is not a - JavaScript MIME type

      +
    4. +

      Let type be the result of extracting a + MIME type from response's header + list.

      -

      For historical reasons, fetching a - classic script does not include MIME type checking. In contrast, module scripts will - fail to load if they are not of a correct MIME type.

      -
    5. - +

      For historical reasons, fetching a + classic script does not include MIME type checking. In contrast, module scripts' + interpretation is driven by their MIME type, and they will fail to load if they are not of + a supported MIME type.

      -
    6. Let source text be the result of UTF-8 - decoding response's body.

    7. +
    8. Let module script be null.

    9. -
    10. Let module script be the result of creating a module script given - source text, module map settings object, response's url, and options.

    11. +
    12. +

      If type is a JavaScript MIME type, then:

      + +
        +
      1. Let source text be the result of UTF-8 + decoding response's body.

      2. + +
      3. Set module script to the result of creating a module script given + source text, module map settings object, response's url, and options.

      4. +
      +
    13. + +
    14. +

      If type is a JSON MIME type, then:

      + +
        +
      1. Set module script to a new JSON module script that this algorithm + will subsequently initialize.

      2. + +
      3. +

        Let json be the result of running consume body on + response with JSON.

        + +

        If this throws an exception, catch it, and set module script's + parse error to that exception.

        +
      4. + +
      5. If no exception was thrown, set module script's record to CreateSyntheticDefaultModule(json, + module map settings object's Realm).

      6. +
      +
    15. Set moduleMap[url] to module @@ -121881,6 +121928,9 @@ INSERT INTERFACES HERE

      [JSINTL]
      ECMAScript Internationalization API Specification. Ecma International.
      +
      [JSSTDLIB]
      +
      JavaScript Standard Library. Ecma International.
      +
      [JSON]
      The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray. IETF.