You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/index.bs
+8-13Lines changed: 8 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1749,8 +1749,7 @@ The Trusted Types portion of this algorithm uses |calleeRealm| and its CSP setti
1749
1749
</pre>
1750
1750
</div>
1751
1751
1752
-
Given a [[ECMA-262#realm|realm]] (|calleeRealm|), a list of strings (|parameterStrings|), a string (|bodyString|), <ins> a string (|source|), an enum (|compilationType|), and a boolean |wasCodeLike|</ins>, this algorithm returns <del>normally</del><ins>the
1753
-
source string to compile</ins> if compilation is allowed, and
1752
+
Given a [[ECMA-262#realm|realm]] (|calleeRealm|), a list of strings (|parameterStrings|), a string (|bodyString|), <ins> a string (|source|), an enum (|compilationType|), and a boolean |wasCodeLike|</ins>, this algorithm returns normally if compilation is allowed, and
1754
1753
throws an "`EvalError`" if not:
1755
1754
1756
1755
1. <ins>If |wasCodeLike| is true, let |sourceToValidate| be a new instance of
@@ -1766,13 +1765,15 @@ throws an "`EvalError`" if not:
1766
1765
* `'script'` as |sinkGroup|,
1767
1766
* {{TrustedScript}} as |expectedType|.</ins>
1768
1767
1769
-
2. <ins>If the algorithm throws an error, throw an {{EvalError}}.</ins>
1768
+
1. <ins>If the algorithm throws an error, throw an {{EvalError}}.</ins>
1770
1769
1771
-
3. Let |global| be a |calleeRealm|'s [=realm/global object=].
1770
+
1. <ins>If |sourceString| is not equal to |source|, throw an {{EvalError}}.</ins>
1772
1771
1773
-
4. Let |result| be "`Allowed`".
1772
+
1. Let |global| be a |calleeRealm|'s [=realm/global object=].
1774
1773
1775
-
5. For each |policy| in |global|'s <a for="global object" spec="CSP3">CSP list</a>:
1774
+
1. Let |result| be "`Allowed`".
1775
+
1776
+
1. For each |policy| in |global|'s <a for="global object" spec="CSP3">CSP list</a>:
1776
1777
1777
1778
1. Let |source-list| be `null`.
1778
1779
@@ -1800,13 +1801,7 @@ throws an "`EvalError`" if not:
1800
1801
5. If |policy|'s [=policy/disposition=] is "`enforce`", then set |result| to
1801
1802
"`Blocked`".
1802
1803
1803
-
6. If |result| is "`Blocked`", throw an `EvalError` exception.
1804
-
1805
-
7. <ins>Return |sourceString|.</ins>
1806
-
1807
-
Note: returning |sourceString| means that the string that gets
1808
-
compiled is that returned by any [=default policy=] in the course of
1809
-
executing [$Get Trusted Type compliant string$].
1804
+
1. If |result| is "`Blocked`", throw an `EvalError` exception.
0 commit comments