| 
142 | 142 |           ]  | 
143 | 143 |         },  | 
144 | 144 |         {  | 
145 |  | -          "html": "<p>Let <var>policyValue</var> be the result of invoking <var>function</var> with\n<var>value</var> as a first argument, items of <var>arguments</var> as subsequent arguments,\nand <a href=\"https://tc39.es/ecma262/multipage/overview.html#sec-method\">callback <strong>this</strong> value</a> set to <code>null</code>, rethrowing any exceptions.</p>"  | 
 | 145 | +          "html": "<p>Let <var>args</var> be « <var>value</var> ».</p>"  | 
 | 146 | +        },  | 
 | 147 | +        {  | 
 | 148 | +          "html": "<p><a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#set-append\" id=\"ref-for-set-append①\">Append</a> each item in <var>arguments</var> to <var>args</var>.</p>"  | 
 | 149 | +        },  | 
 | 150 | +        {  | 
 | 151 | +          "html": "<p>Let <var>policyValue</var> be the result of <a data-link-type=\"dfn\" href=\"https://webidl.spec.whatwg.org/#invoke-a-callback-function\" id=\"ref-for-invoke-a-callback-function\">invoking</a> <var>function</var> with\n<var>args</var> and <code>\"rethrow\"</code>.</p>"  | 
146 | 152 |         },  | 
147 | 153 |         {  | 
148 | 154 |           "html": "<p>Return <var>policyValue</var>.</p>"  | 
 | 
223 | 229 |           "html": "<p>Let <var>sink</var> be \"<code>HTMLScriptElement text</code>\" if <var>script</var> is an <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://html.spec.whatwg.org/multipage/scripting.html#htmlscriptelement\" id=\"ref-for-htmlscriptelement⑤\">HTMLScriptElement</a></code>; otherwise \"<code>SVGScriptElement text</code>\".</p>"  | 
224 | 230 |         },  | 
225 | 231 |         {  | 
226 |  | -          "html": "<p>If <var>script</var>’s <a data-link-type=\"dfn\" href=\"https://w3c.github.io/trusted-types/dist/spec/#htmlscriptelement-script-text\" id=\"ref-for-htmlscriptelement-script-text\">script text</a> value is not equal to its <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-child-text-content\" id=\"ref-for-concept-child-text-content\">child text content</a>,\nset <var>script</var>’s <a data-link-type=\"dfn\" href=\"https://w3c.github.io/trusted-types/dist/spec/#htmlscriptelement-script-text\" id=\"ref-for-htmlscriptelement-script-text①\">script text</a> to the result of executing <a data-link-type=\"abstract-op\" href=\"https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-get-trusted-type-compliant-string\" id=\"ref-for-abstract-opdef-get-trusted-type-compliant-string\">Get Trusted Type compliant string</a>, with the following arguments:</p>\n     <ul>\n      <li data-md=\"\">\n       <p><code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/trusted-types/dist/spec/#trustedscripturl\" id=\"ref-for-trustedscripturl④\">TrustedScriptURL</a></code> as <var>expectedType</var>,</p>\n      </li><li data-md=\"\">\n       <p><var>script</var>’s <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://dom.spec.whatwg.org/#document\" id=\"ref-for-document①\">Document</a></code>’s <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global\" id=\"ref-for-concept-relevant-global①\">relevant global object</a> as <var>global</var>,</p>\n      </li><li data-md=\"\">\n       <p><var>script</var>’s <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-child-text-content\" id=\"ref-for-concept-child-text-content①\">child text content</a> attribute value,</p>\n      </li><li data-md=\"\">\n       <p><var>sink</var>,</p>\n      </li><li data-md=\"\">\n       <p><code>'script'</code> as <var>sinkGroup</var>.</p>\n     </li></ul>\n     <p>If the algorithm threw an error, rethrow the error.</p>"  | 
 | 232 | +          "html": "<p>If <var>script</var>’s <a data-link-type=\"dfn\" href=\"https://w3c.github.io/trusted-types/dist/spec/#htmlscriptelement-script-text\" id=\"ref-for-htmlscriptelement-script-text\">script text</a> value is not equal to its <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-child-text-content\" id=\"ref-for-concept-child-text-content\">child text content</a>,\nset <var>script</var>’s <a data-link-type=\"dfn\" href=\"https://w3c.github.io/trusted-types/dist/spec/#htmlscriptelement-script-text\" id=\"ref-for-htmlscriptelement-script-text①\">script text</a> to the result of executing <a data-link-type=\"abstract-op\" href=\"https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-get-trusted-type-compliant-string\" id=\"ref-for-abstract-opdef-get-trusted-type-compliant-string\">Get Trusted Type compliant string</a>, with the following arguments:</p>\n     <ul>\n      <li data-md=\"\">\n       <p><code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/trusted-types/dist/spec/#trustedscripturl\" id=\"ref-for-trustedscripturl④\">TrustedScriptURL</a></code> as <var>expectedType</var>,</p>\n      </li><li data-md=\"\">\n       <p><var>script</var>’s <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://dom.spec.whatwg.org/#document\" id=\"ref-for-document①\">Document</a></code>’s <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global\" id=\"ref-for-concept-relevant-global①\">relevant global object</a> as <var>global</var>,</p>\n      </li><li data-md=\"\">\n       <p><var>script</var>’s <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-child-text-content\" id=\"ref-for-concept-child-text-content①\">child text content</a> attribute value as <var>input</var>,</p>\n      </li><li data-md=\"\">\n       <p><var>sink</var>,</p>\n      </li><li data-md=\"\">\n       <p><code>'script'</code> as <var>sinkGroup</var>.</p>\n     </li></ul>\n     <p>If the algorithm threw an error, rethrow the error.</p>"  | 
227 | 233 |         }  | 
228 | 234 |       ]  | 
229 | 235 |     },  | 
230 | 236 |     {  | 
231 | 237 |       "html": "Given an <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://html.spec.whatwg.org/multipage/scripting.html#htmlscriptelement\" id=\"ref-for-htmlscriptelement④\">HTMLScriptElement</a></code> or <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://svgwg.org/svg2-draft/interact.html#InterfaceSVGScriptElement\" id=\"ref-for-InterfaceSVGScriptElement\">SVGScriptElement</a></code> (<var>script</var>), this algorithm performs the following steps:",  | 
232 |  | -      "rationale": "set",  | 
 | 238 | +      "rationale": "if",  | 
233 | 239 |       "steps": [  | 
234 | 240 |         {  | 
235 |  | -          "html": "<p>Set <var>attributeData</var> to the result of <a data-link-type=\"abstract-op\" href=\"https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-get-trusted-type-data-for-attribute\" id=\"ref-for-abstract-opdef-get-trusted-type-data-for-attribute①\">Get Trusted Type data for attribute</a> algorithm, with the following arguments:</p>\n     <ul>\n      <li data-md=\"\">\n       <p><var>element</var></p>\n      </li><li data-md=\"\">\n       <p><var>attribute</var>’s <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-attribute-local-name\" id=\"ref-for-concept-attribute-local-name\">local name</a> as <var>attribute</var></p>\n      </li><li data-md=\"\">\n       <p><var>attribute</var>’s <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-attribute-namespace\" id=\"ref-for-concept-attribute-namespace\">namespace</a> as <var>attributeNs</var></p>\n     </li></ul>"  | 
 | 241 | +          "html": "<p>If <var>attributeNs</var> is the empty string, set <var>attributeNs</var> to null.</p>"  | 
 | 242 | +        },  | 
 | 243 | +        {  | 
 | 244 | +          "html": "<p>Set <var>attributeData</var> to the result of <a data-link-type=\"abstract-op\" href=\"https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-get-trusted-type-data-for-attribute\" id=\"ref-for-abstract-opdef-get-trusted-type-data-for-attribute①\">Get Trusted Type data for attribute</a> algorithm, with the following arguments:</p>\n     <ul>\n      <li data-md=\"\">\n       <p><var>element</var></p>\n      </li><li data-md=\"\">\n       <p><var>attributeName</var></p>\n      </li><li data-md=\"\">\n       <p><var>attributeNs</var></p>\n     </li></ul>"  | 
236 | 245 |         },  | 
237 | 246 |         {  | 
238 | 247 |           "html": "If <var>attributeData</var> is null, then:",  | 
 | 
0 commit comments