diff --git a/source b/source index cc8ed1e1713..f75402e80b9 100644 --- a/source +++ b/source @@ -2743,6 +2743,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

The following terms are defined in the WHATWG MIME Sniffing standard:

+

Implementations that support scripting must support the CSS Constructable Stylesheet + Objects. The following features and terms are defined in the CSS Constructable Stylesheet + Objects specifications: + +

+

The CanvasRenderingContext2D object's use of fonts depends on the features described in the CSS Fonts and Font Loading specifications, including in particular FontFace objects and the ApplicationCache : EventTarget {

Definitions
-

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

@@ -86786,7 +86806,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 CSS 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 @@ -86839,6 +86861,10 @@ interface ApplicationCache : EventTarget { data-x="concept-script">script. It has no additional items.

+

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

+

The active script is determined by the following algorithm:

    @@ -87477,25 +87503,83 @@ 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 the essence of type is text/css, then:

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

    2. + +
    3. +

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

      + +

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

      +
    4. + +
    5. Let sheet be a new CSSStyleSheet object, as if the constructor + is called with no arguments.

    6. + +
    7. Let promise be the result of invoking the replace() operation with text as an + argument.

    8. + +
    9. Upon fulfillment of promise: +

        +
      1. Unset sheet's constructed flag.
      2. +
      3. +

        Set module script's record to CreateSyntheticModule + (« "default" », the following steps, module map settings object's + Realm, sheet) with the + following steps given module as an argument:

        +
          +
        1. SetSyntheticModuleExport(module, "default", + module.[[HostDefined]]).
        2. +
        +
      4. +
      +
    10. + +
    11. Upon rejection of promise with reason, set module + script's parse error to + reason.

      + +
    12. Wait until one of the above promise reactions executes before continuing these + steps.

    13. +
    +
  15. Set moduleMap[url] to module @@ -121771,6 +121855,9 @@ INSERT INTERFACES HERE

    [CSSWM]
    CSS Writing Modes, E. Etemad, K. Ishii. W3C.
    +
    [CSSCSO]
    +
    Constructable Stylesheet Objects, T. Atkins, E. Willigers, R. Amni. W3C.
    +
    [DASH]
    Dynamic adaptive streaming over HTTP (DASH). ISO.
    @@ -121884,6 +121971,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.