diff --git a/dom.bs b/dom.bs index 7e1b2fad..d9ece77e 100644 --- a/dom.bs +++ b/dom.bs @@ -3034,41 +3034,28 @@ standards that want to define APIs shared between documents and parent, nodes and document, run these steps:
    +
  1. Let node be null. +

  2. Replace each string in nodes with a new {{Text}} node whose + data is the string and node document is + document.

  3. Let isScriptElement be parent is a {{HTMLScriptElement}}. -

  4. For each value in nodes: +

  5. For each value in nodes:

    1. If value is a node, then:
      1. If isScriptElement is false, skip to the next value. -
      2. If value's {{nodeType}} is not {{TEXT_NODE}}, skip to the next value. -
      3. Let text be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments: - * {{TrustedScript}} as expectedType, - * document's [=relevant global object=] as global, - * value's data as input, - * `HTMLScriptElement text` as sink, - * `script` as sinkGroup. - -

        If the algorithm threw an error, rethrow the error. -

      4. Set value's data to text. +
      5. If value is not a {{Text}} node, then continue. +
      6. Let text be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments: + * {{TrustedScript}} as expectedType, + * document's [=relevant global object=] as global, + * value's data as input, + * `HTMLScriptElement text` as sink, + * `script` as sinkGroup. + +

        If the algorithm threw an error, rethrow the error. +

      7. Set value's data to text.
      -
    2. If value is a string, then: -
        -
      1. Let text be value. -
      2. If isScriptElement is true: -
          -
        1. Let text be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments: - * {{TrustedScript}} as expectedType, - * document's [=relevant global object=] as global, - * value as input, - * `HTMLScriptElement text` as sink, - * `script` as sinkGroup. - - If the algorithm threw an error, rethrow the error. -
        2. Let newValue be a new {{Text}} node whose - data is text and node document is document. -
        3. Replace value with newValue. -
        -
      +
    3. If value is a {{TrustedScript}}, then:
      1. Let text be value's Data internal slot value. @@ -3077,7 +3064,6 @@ standards that want to define APIs shared between documents and
      2. Replace value with newValue.
    -
  6. Let node be null.

  7. If nodes contains one node, then set node to nodes[0].