|
664 | 664 | "html": "<p>Let <var>sourceToValidate</var> be a <a data-link-type=\"dfn\" href=\"https://webidl.spec.whatwg.org/#new\" id=\"ref-for-new\">new</a> <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://www.w3.org/TR/trusted-types/#trustedscript\" id=\"ref-for-trustedscript②\">TrustedScript</a></code> object created in <var>realm</var>\n whose <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/trusted-types/#trustedscript-data\" id=\"ref-for-trustedscript-data②\">data</a> is set to <var>codeString</var> if <var>isTrusted</var> is <code>true</code>, and\n <var>codeString</var> otherwise.</p>" |
665 | 665 | }, |
666 | 666 | { |
667 | | - "html": "<p>Let <var>sourceString</var> be the result of executing the <a data-link-type=\"abstract-op\" href=\"https://www.w3.org/TR/trusted-types/#abstract-opdef-get-trusted-type-compliant-string\" id=\"ref-for-abstract-opdef-get-trusted-type-compliant-string\">Get Trusted Type compliant string</a> algorithm, with\n <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://www.w3.org/TR/trusted-types/#trustedscript\" id=\"ref-for-trustedscript③\">TrustedScript</a></code>, <var>realm</var>, <var>sourceToValidate</var>, <var>compilationSink</var>, and <code>'script'</code>.</p>" |
| 667 | + "html": "<p>Let <var>sourceString</var> be the result of executing the <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/trusted-types/#get-trusted-type-compliant-string\" id=\"ref-for-get-trusted-type-compliant-string\">get trusted type compliant string</a> algorithm, with\n <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://www.w3.org/TR/trusted-types/#trustedscript\" id=\"ref-for-trustedscript③\">TrustedScript</a></code>, <var>realm</var>, <var>sourceToValidate</var>, <var>compilationSink</var>, and <code>'script'</code>.</p>" |
668 | 668 | }, |
669 | 669 | { |
670 | 670 | "html": "<p>If the algorithm throws an error, throw an <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webidl.spec.whatwg.org/#exceptiondef-evalerror\" id=\"ref-for-exceptiondef-evalerror\">EvalError</a></code>.</p>" |
|
695 | 695 | "rationale": "let", |
696 | 696 | "steps": [ |
697 | 697 | { |
698 | | - "html": "<p>Let <var>trustedTypesRequired</var> be the result of executing <a data-link-type=\"abstract-op\" href=\"https://www.w3.org/TR/trusted-types/#abstract-opdef-does-sink-type-require-trusted-types\" id=\"ref-for-abstract-opdef-does-sink-type-require-trusted-types\">Does sink type require trusted types?</a>, with\n <var>realm</var>, <code>'script'</code>, and <code>false</code>.</p>" |
| 698 | + "html": "<p>Let <var>trustedTypesRequired</var> be the result of executing <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/trusted-types/#does-sink-type-require-trusted-types\" id=\"ref-for-does-sink-type-require-trusted-types\">does sink type require trusted types?</a>, with\n <var>realm</var>, <code>'script'</code>, and <code>false</code>.</p>" |
699 | 699 | }, |
700 | 700 | { |
701 | 701 | "html": "<p>If <var>trustedTypesRequired</var> is <code>true</code> and <var>source-list</var> contains a <a data-link-type=\"dfn\" href=\"https://w3c.github.io/webappsec-csp/#source-expression\" id=\"ref-for-source-expression②\">source expression</a> which is an\n <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#ascii-case-insensitive\" id=\"ref-for-ascii-case-insensitive①\">ASCII case-insensitive</a> match for the string \"<a data-link-type=\"grammar\" href=\"https://w3c.github.io/webappsec-csp/#grammardef-trusted-types-eval\" id=\"ref-for-grammardef-trusted-types-eval\"><code>'trusted-types-eval'</code></a>\", then skip the\n following steps.</p>" |
|
2237 | 2237 | "html": "<a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-iterate\" id=\"ref-for-list-iterate③⑨\">For each</a> <var>expression</var> of <var>list</var>:", |
2238 | 2238 | "rationale": "if", |
2239 | 2239 | "steps": [ |
| 2240 | + { |
| 2241 | + "html": "If <var>expression</var> is the \"<a data-link-type=\"grammar\" href=\"https://w3c.github.io/webappsec-csp/#grammardef-strict-dynamic\" id=\"ref-for-grammardef-strict-dynamic⑤\"><code>'strict-dynamic'</code></a>\" <a data-link-type=\"grammar\" href=\"https://w3c.github.io/webappsec-csp/#grammardef-keyword-source\" id=\"ref-for-grammardef-keyword-source⑦\">keyword-source</a>:", |
| 2242 | + "rationale": "if", |
| 2243 | + "steps": [ |
| 2244 | + { |
| 2245 | + "html": "<p>If <var>type</var> is \"<code>script</code>\", and <var>element</var> is not <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/scripting.html#parser-inserted\" id=\"ref-for-parser-inserted③\">parser-inserted</a>, return \"<code>Matches</code>\".</p>" |
| 2246 | + } |
| 2247 | + ] |
| 2248 | + }, |
2240 | 2249 | { |
2241 | 2250 | "html": "If <var>expression</var> matches the <a data-link-type=\"grammar\" href=\"https://w3c.github.io/webappsec-csp/#grammardef-hash-source\" id=\"ref-for-grammardef-hash-source⑦\"><code>hash-source</code></a> grammar:", |
2242 | 2251 | "rationale": "let", |
|
2273 | 2282 | ] |
2274 | 2283 | } |
2275 | 2284 | ] |
2276 | | - } |
2277 | | - ] |
2278 | | - }, |
2279 | | - { |
2280 | | - "html": "Given an <code class=\"idl\"><a data-link-type=\"idl\" href=\"https://dom.spec.whatwg.org/#element\" id=\"ref-for-element①⓪\">Element</a></code> <var>element</var>, a <a data-link-type=\"dfn\" href=\"https://w3c.github.io/webappsec-csp/#source-lists\" id=\"ref-for-source-lists②③\">source list</a> <var>list</var>, a string\n <var>type</var>, and a string <var>source</var>, this algorithm returns \"<code>Matches</code>\" or\n \"<code>Does Not Match</code>\".", |
2281 | | - "rationale": "return", |
2282 | | - "steps": [ |
| 2285 | + }, |
2283 | 2286 | { |
2284 | 2287 | "html": "<p>Return \"<code>Does Not Match</code>\".</p>" |
2285 | 2288 | } |
|
0 commit comments