@@ -135,6 +135,10 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/
135
135
text: content security policy state; url: attr-meta-http-equiv-content-security-policy
136
136
text: create and initialize a new document object; url: initialise-the-document-object
137
137
text: initializing a new Document object; url: initialise-the-document-object
138
+ for: policy container
139
+ text: CSP list; url: policy-container-csp-list
140
+ for: document
141
+ text: policy container; url: concept-document-policy-container
138
142
139
143
spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
140
144
type: grammar
@@ -543,6 +547,11 @@ spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
543
547
4. Return |policies|.
544
548
</ol>
545
549
550
+ Note: When <a abstract-op lt="parse a response's Content Security Policies">parsing a response's
551
+ Content Security Policies</a> , if the resulting |policies| end up containing at least one item,
552
+ user agents can hold a flag on |policies| and use it to optimize away the [=/contains a
553
+ header-delivered Content Security Policy=] algorithm.
554
+
546
555
<h3 id="framework-directives">Directives</h3>
547
556
548
557
Each <a for="/">policy</a> contains an <a>ordered set</a> of <dfn export>directives</dfn> (its
@@ -594,8 +603,8 @@ spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
594
603
595
604
5. An <dfn for="directive" export>initialization</dfn> , which takes a {{Document}}
596
605
or <a for="/">global object</a> and a <a for="/">policy</a> as arguments. This
597
- algorithm is executed during [[#initialize -document-csp]] , and has no effect unless
598
- otherwise specified.
606
+ algorithm is executed during [[#run -document-csp-initialization ]] , and has no
607
+ effect unless otherwise specified.
599
608
600
609
6. A <dfn for="directive" export>pre-navigation check</dfn> , which takes a
601
610
<a for="/">request</a> , a navigation type string ("`form-submission`"
@@ -1137,11 +1146,11 @@ spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
1137
1146
Integration with HTML
1138
1147
</h3>
1139
1148
1140
- 1. The [=policy container=] has a <a for=" policy container"> CSP list</a> , which holds
1149
+ 1. The [=/ policy container=] has a [= policy container/ CSP list=] , which holds
1141
1150
all the <a for="/">policy</a> objects which are active for a given context. This
1142
1151
list is empty unless otherwise specified, and is populated from the <a>response</a> by <a
1143
1152
abstract-op lt="parse a response's Content Security Policies"> parsing</a> <a>response</a> 's
1144
- Content Security Policies or inherited following the rules of the [=policy container=] .
1153
+ Content Security Policies or inherited following the rules of the [=/ policy container=] .
1145
1154
1146
1155
2. A <a for="/">global object</a> 's <dfn for="global object" id="global-object-csp-list">CSP list</dfn>
1147
1156
is the result of executing [[#get-csp-of-object]] with the <a for="/">global object</a>
@@ -1151,7 +1160,7 @@ spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
1151
1160
<a for="/">global object</a> by inserting it into the <a for="/">global object</a> 's
1152
1161
<a for="global object">CSP list</a> .
1153
1162
1154
- 4. [[#initialize -document-csp]] is called during the <a>create and initialize a
1163
+ 4. [[#run -document-csp-initialization ]] is called during the <a>create and initialize a
1155
1164
new `Document` object</a> algorithm.
1156
1165
1157
1166
5. [[#should-block-inline]] is called during the <a>prepare a script</a> and
@@ -1182,14 +1191,14 @@ spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
1182
1191
apply directive's navigation checks, as well as inline checks for
1183
1192
navigations to `javascript:` URLs.
1184
1193
1185
- <h4 id="initialize -document-csp" algorithm dfn export>
1186
- Initialize a `Document`'s `CSP `
1194
+ <h4 id="run -document-csp-initialization " algorithm dfn export>
1195
+ Run `CSP` initialization for a `Document `
1187
1196
</h4>
1188
1197
1189
1198
Given a {{Document}} (|document|), the user agent performs the following
1190
- steps in order to initialize |document|'s CSP :
1199
+ steps in order to initialize CSP for |document|:
1191
1200
1192
- 1. For each |policy| in |document|'s [=document/policy- container=]' s
1201
+ 1. For each |policy| in |document|'s [=document/policy container=]' s
1193
1202
[=policy container/CSP list=] :
1194
1203
1195
1204
1. For each |directive| in |policy|:
0 commit comments