-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
2480 lines (2336 loc) · 178 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html><html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Document-Isolation-Policy</title>
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<link href="https://www.w3.org/StyleSheets/TR/2021/cg-draft" rel="stylesheet">
<meta content="Bikeshed version b25686b9f, updated Fri Mar 14 14:15:20 2025 -0700" name="generator">
<link href="https://github.com/WICG/document-isolation-policy" rel="canonical">
<meta content="f9df6f2168f65516a463006e7320447280bbbef6" name="revision">
<meta content="dark light" name="color-scheme">
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
<style>
.monkey-patch {
padding: .5em;
border: thin solid #ddd;
border: thin solid 1px;
border-radius: .5em;
margin: .5em calc(-0.5em - 1px);
background-color: rgba(255, 255, 0, 0.03);
backdrop-filter: blur(5px);
box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.05);
}
.brief {
line-height: 10%;
}
.customHighlight {
padding-top:9px ;
padding-bottom:9px ;
background-color: rgba(255,255,0,0.3)
}
</style>
<style>/* Boilerplate: style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
color: var(--a-normal-text);
font-size: inherit;
font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
content: "‘";
}
.css::after, .property::after, .descriptor::after {
content: "’";
}
.property, .descriptor {
/* Don't wrap property and descriptor names */
white-space: nowrap;
}
.type { /* CSS value <type> */
font-style: italic;
}
pre .property::before, pre .property::after {
content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
content: "’";
}
[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
content: "";
}
[data-link-type=element],
[data-link-type=element-attr] {
font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after { content: ">" }
[data-link-type=biblio] {
white-space: pre;
}
@media (prefers-color-scheme: dark) {
:root {
--selflink-text: black;
--selflink-bg: silver;
--selflink-hover-text: white;
}
}
</style>
<style>/* Boilerplate: style-colors */
/* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */
:root {
color-scheme: light dark;
--text: black;
--bg: white;
--unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2016/logos/UD-watermark);
--logo-bg: #1a5e9a;
--logo-active-bg: #c00;
--logo-text: white;
--tocnav-normal-text: #707070;
--tocnav-normal-bg: var(--bg);
--tocnav-hover-text: var(--tocnav-normal-text);
--tocnav-hover-bg: #f8f8f8;
--tocnav-active-text: #c00;
--tocnav-active-bg: var(--tocnav-normal-bg);
--tocsidebar-text: var(--text);
--tocsidebar-bg: #f7f8f9;
--tocsidebar-shadow: rgba(0,0,0,.1);
--tocsidebar-heading-text: hsla(203,20%,40%,.7);
--toclink-text: var(--text);
--toclink-underline: #3980b5;
--toclink-visited-text: var(--toclink-text);
--toclink-visited-underline: #054572;
--heading-text: #005a9c;
--hr-text: var(--text);
--algo-border: #def;
--del-text: red;
--del-bg: transparent;
--ins-text: #080;
--ins-bg: transparent;
--a-normal-text: #034575;
--a-normal-underline: #bbb;
--a-visited-text: var(--a-normal-text);
--a-visited-underline: #707070;
--a-hover-bg: rgba(75%, 75%, 75%, .25);
--a-active-text: #c00;
--a-active-underline: #c00;
--blockquote-border: silver;
--blockquote-bg: transparent;
--blockquote-text: currentcolor;
--issue-border: #e05252;
--issue-bg: #fbe9e9;
--issue-text: var(--text);
--issueheading-text: #831616;
--example-border: #e0cb52;
--example-bg: #fcfaee;
--example-text: var(--text);
--exampleheading-text: #574b0f;
--note-border: #52e052;
--note-bg: #e9fbe9;
--note-text: var(--text);
--noteheading-text: hsl(120, 70%, 30%);
--notesummary-underline: silver;
--assertion-border: #aaa;
--assertion-bg: #eee;
--assertion-text: black;
--advisement-border: orange;
--advisement-bg: #fec;
--advisement-text: var(--text);
--advisementheading-text: #b35f00;
--warning-border: red;
--warning-bg: hsla(40,100%,50%,0.95);
--warning-text: var(--text);
--amendment-border: #330099;
--amendment-bg: #F5F0FF;
--amendment-text: var(--text);
--amendmentheading-text: #220066;
--def-border: #8ccbf2;
--def-bg: #def;
--def-text: var(--text);
--defrow-border: #bbd7e9;
--datacell-border: silver;
--indexinfo-text: #707070;
--indextable-hover-text: black;
--indextable-hover-bg: #f7f8f9;
--outdatedspec-bg: rgba(0, 0, 0, .5);
--outdatedspec-text: black;
--outdated-bg: maroon;
--outdated-text: white;
--outdated-shadow: red;
--editedrec-bg: darkorange;
}
@media (prefers-color-scheme: dark) {
:root {
--text: #ddd;
--bg: black;
--unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E");
--logo-bg: #1a5e9a;
--logo-active-bg: #c00;
--logo-text: white;
--tocnav-normal-text: #999;
--tocnav-normal-bg: var(--bg);
--tocnav-hover-text: var(--tocnav-normal-text);
--tocnav-hover-bg: #080808;
--tocnav-active-text: #f44;
--tocnav-active-bg: var(--tocnav-normal-bg);
--tocsidebar-text: var(--text);
--tocsidebar-bg: #080808;
--tocsidebar-shadow: rgba(255,255,255,.1);
--tocsidebar-heading-text: hsla(203,20%,40%,.7);
--toclink-text: var(--text);
--toclink-underline: #6af;
--toclink-visited-text: var(--toclink-text);
--toclink-visited-underline: #054572;
--heading-text: #8af;
--hr-text: var(--text);
--algo-border: #456;
--del-text: #f44;
--del-bg: transparent;
--ins-text: #4a4;
--ins-bg: transparent;
--a-normal-text: #6af;
--a-normal-underline: #555;
--a-visited-text: var(--a-normal-text);
--a-visited-underline: var(--a-normal-underline);
--a-hover-bg: rgba(25%, 25%, 25%, .2);
--a-active-text: #f44;
--a-active-underline: var(--a-active-text);
--borderedblock-bg: rgba(255, 255, 255, .05);
--blockquote-border: silver;
--blockquote-bg: var(--borderedblock-bg);
--blockquote-text: currentcolor;
--issue-border: #e05252;
--issue-bg: var(--borderedblock-bg);
--issue-text: var(--text);
--issueheading-text: hsl(0deg, 70%, 70%);
--example-border: hsl(50deg, 90%, 60%);
--example-bg: var(--borderedblock-bg);
--example-text: var(--text);
--exampleheading-text: hsl(50deg, 70%, 70%);
--note-border: hsl(120deg, 100%, 35%);
--note-bg: var(--borderedblock-bg);
--note-text: var(--text);
--noteheading-text: hsl(120, 70%, 70%);
--notesummary-underline: silver;
--assertion-border: #444;
--assertion-bg: var(--borderedblock-bg);
--assertion-text: var(--text);
--advisement-border: orange;
--advisement-bg: #222218;
--advisement-text: var(--text);
--advisementheading-text: #f84;
--warning-border: red;
--warning-bg: hsla(40,100%,20%,0.95);
--warning-text: var(--text);
--amendment-border: #330099;
--amendment-bg: #080010;
--amendment-text: var(--text);
--amendmentheading-text: #cc00ff;
--def-border: #8ccbf2;
--def-bg: #080818;
--def-text: var(--text);
--defrow-border: #136;
--datacell-border: silver;
--indexinfo-text: #aaa;
--indextable-hover-text: var(--text);
--indextable-hover-bg: #181818;
--outdatedspec-bg: rgba(255, 255, 255, .5);
--outdatedspec-text: black;
--outdated-bg: maroon;
--outdated-text: white;
--outdated-shadow: red;
--editedrec-bg: darkorange;
}
/* In case a transparent-bg image doesn't expect to be on a dark bg,
which is quite common in practice... */
img { background: white; }
}
</style>
<style>/* Boilerplate: style-counters */
body {
counter-reset: example figure issue;
}
.issue {
counter-increment: issue;
}
.issue:not(.no-marker)::before {
content: "Issue " counter(issue);
}
.example {
counter-increment: example;
}
.example:not(.no-marker)::before {
content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
content: "Invalid Example" counter(example);
}
figcaption {
counter-increment: figure;
}
figcaption:not(.no-marker)::before {
content: "Figure " counter(figure) " ";
}
</style>
<style>/* Boilerplate: style-dfn-panel */
:root {
--dfnpanel-bg: #ddd;
--dfnpanel-text: var(--text);
--dfnpanel-target-bg: #ffc;
--dfnpanel-target-outline: orange;
}
@media (prefers-color-scheme: dark) {
:root {
--dfnpanel-bg: #222;
--dfnpanel-text: var(--text);
--dfnpanel-target-bg: #333;
--dfnpanel-target-outline: silver;
}
}
.dfn-panel {
position: absolute;
z-index: 35;
width: 20em;
width: 300px;
height: auto;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--dfnpanel-bg);
color: var(--dfnpanel-text);
border: outset 0.2em;
white-space: normal; /* in case it's moved into a pre */
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: var(--dfnpanel-text); }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel a:focus {
outline: 5px auto Highlight;
outline: 5px auto -webkit-focus-ring-color;
}
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0 0 0 1em; list-style: none; }
.dfn-panel li a {
max-width: calc(300px - 1.5em - 1em);
overflow: hidden;
text-overflow: ellipsis;
}
.dfn-panel.activated {
display: inline-block;
position: fixed;
left: 8px;
bottom: 2em;
margin: 0 auto;
max-width: calc(100vw - 1.5em - .4em - .5em);
max-height: 30vh;
transition: left 1s ease-out, bottom 1s ease-out;
}
.dfn-panel .link-item:hover {
text-decoration: underline;
}
.dfn-panel .link-item .copy-icon {
opacity: 0;
}
.dfn-panel .link-item:hover .copy-icon,
.dfn-panel .link-item .copy-icon:focus {
opacity: 1;
}
.dfn-panel .copy-icon {
display: inline-block;
margin-right: 0.5em;
width: 0.85em;
height: 1em;
border-radius: 3px;
background-color: #ccc;
cursor: pointer;
}
.dfn-panel .copy-icon .icon {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.dfn-panel .copy-icon .icon::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 1px solid black;
background-color: #ccc;
opacity: 0.25;
transform: translate(3px, -3px);
}
.dfn-panel .copy-icon:active .icon::before {
opacity: 1;
}
.dfn-paneled[role="button"] { cursor: help; }
.highlighted {
animation: target-fade 3s;
}
@keyframes target-fade {
from {
background-color: var(--dfnpanel-target-bg);
outline: 5px solid var(--dfnpanel-target-outline);
}
to {
color: var(--a-normal-text);
background-color: transparent;
outline: transparent;
}
}
</style>
<style>/* Boilerplate: style-issues */
a[href].issue-return {
float: right;
float: inline-end;
color: var(--issueheading-text);
font-weight: bold;
text-decoration: none;
}
</style>
<style>/* Boilerplate: style-md-lists */
/* This is a weird hack for me not yet following the commonmark spec
regarding paragraph and lists. */
[data-md] > :first-child {
margin-top: 0;
}
[data-md] > :last-child {
margin-bottom: 0;
}
</style>
<style>/* Boilerplate: style-ref-hints */
:root {
--ref-hint-bg: #ddd;
--ref-hint-text: var(--text);
}
@media (prefers-color-scheme: dark) {
:root {
--ref-hint-bg: #222;
--ref-hint-text: var(--text);
}
}
.ref-hint {
display: inline-block;
position: absolute;
z-index: 35;
width: 20em;
width: 300px;
height: auto;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.5em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--ref-hint-bg);
color: var(--ref-hint-text);
border: outset 0.2em;
white-space: normal; /* in case it's moved into a pre */
}
.ref-hint * { margin: 0; padding: 0; text-indent: 0; }
.ref-hint ul { padding: 0 0 0 1em; list-style: none; }
</style>
<style>/* Boilerplate: style-selflinks */
:root {
--selflink-text: white;
--selflink-bg: gray;
--selflink-hover-text: black;
}
.heading, .issue, .note, .example, li, dt {
position: relative;
}
a.self-link {
position: absolute;
top: 0;
left: calc(-1 * (3.5rem - 26px));
width: calc(3.5rem - 26px);
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
}
a.self-link:hover {
opacity: 1;
}
.heading > a.self-link {
font-size: 83%;
}
.example > a.self-link,
.note > a.self-link,
.issue > a.self-link {
/* These blocks are overflow:auto, so positioning outside
doesn't work. */
left: auto;
right: 0;
}
li > a.self-link {
left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
top: auto;
left: auto;
opacity: 0;
width: 1.5em;
height: 1.5em;
background: var(--selflink-bg);
color: var(--selflink-text);
font-style: normal;
transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
opacity: 1;
}
dfn > a.self-link:hover {
color: var(--selflink-hover-text);
}
a.self-link::before { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before { content: "#"; }
</style>
<style>/* Boilerplate: style-wpt */
:root {
--wpt-border: hsl(0, 0%, 60%);
--wpt-bg: hsl(0, 0%, 95%);
--wpt-text: var(--text);
--wptheading-text: hsl(0, 0%, 30%);
}
@media (prefers-color-scheme: dark) {
:root {
--wpt-border: hsl(0, 0%, 30%);
--wpt-bg: var(--borderedblock-bg);
--wpt-text: var(--text);
--wptheading-text: hsl(0, 0%, 60%);
}
}
.wpt-tests-block {
list-style: none;
border-left: .5em solid var(--wpt-border);
background: var(--wpt-bg);
color: var(--wpt-text);
margin: 1em auto;
padding: .5em;
}
.wpt-tests-block summary {
color: var(--wptheading-text);
font-weight: normal;
text-transform: uppercase;
}
.wpt-tests-block summary::marker{
color: var(--wpt-border);
}
.wpt-tests-block summary:hover::marker{
color: var(--wpt-text);
}
/*
The only content of a wpt test block in its closed state is the <summary>,
which contains the word TESTS,
and that is absolutely positioned.
In that closed state, wpt test blocks are styled
to have a top margin whose height is exactly equal
to the height of the absolutely positioned <summary>,
and no other background/padding/margin/border.
The wpt test block elements will therefore allow the maring
of the previous/next block elements
to collapse through them;
if this combined margin would be larger than its own top margin,
it stays as is,
and therefore the pre-existing vertical rhythm of the document is undisturbed.
If that combined margin would be smaller, it is grown to that size.
This means that the wpt test block ensures
that there's always enough vertical space to insert the summary,
without adding more than is needed.
*/
.wpt-tests-block:not([open]){
padding: 0;
border: none;
background: none;
font-size: 0.75em;
line-height: 1;
position: relative;
margin: 1em 0 0;
}
.wpt-tests-block:not([open]) summary {
position: absolute;
right: 0;
bottom: 0;
}
/*
It is possible that both the last child of a block element
and the block element itself
would be annotated with a <wpt> block each.
If the block element has a padding or a border,
that's fine, but otherwise
the bottom margin of the block and of its last child would collapse
and both <wpt> elements would overlap, being both placed there.
To avoid that, add 1px of padding to the <wpt> element annotating the last child
to prevent the bottom margin of the block and of its last child from collapsing
(and as much negative margin,
as wel only want to prevent margin collapsing,
but are not trying to actually take more space).
*/
.wpt-tests-block:not([open]):last-child {
padding-bottom: 1px;
margin-bottom: -1px;
}
/*
Exception to the previous rule:
don't do that in non-last list items,
because it's not necessary,
and would therefore consume more space than strictly needed.
Lists must have list items as children, not <wpt> elements,
so a <wpt> element cannot be a sibling of a list item,
and the collision that the previous rule avoids cannot happen.
*/
li:not(:last-child) > .wpt-tests-block:not([open]):last-child,
dd:not(:last-child) > .wpt-tests-block:not([open]):last-child {
padding-bottom: 0;
margin-bottom: 0;
}
.wpt-tests-block:not([open]):not(:hover){
opacity: 0.5;
}
.wpt-tests-list {
list-style: none;
display: grid;
margin: 0;
padding: 0;
grid-template-columns: 1fr max-content auto auto;
grid-column-gap: .5em;
}
.wpt-tests-block hr:last-child {
display: none;
}
.wpt-test {
display: contents;
}
.wpt-test > a {
text-decoration: underline;
border: none;
}
.wpt-test > .wpt-name { grid-column: 1; }
.wpt-test > .wpt-results { grid-column: 2; }
.wpt-test > .wpt-live { grid-column: 3; }
.wpt-test > .wpt-source { grid-column: 4; }
.wpt-test > .wpt-results {
display: flex;
gap: .1em;
}
.wpt-test .wpt-result {
display: inline-block;
height: 1em;
width: 1em;
border-radius: 50%;
position: relative;
}
</style>
<body class="h-entry">
<div class="head">
<h1 class="p-name no-ref" id="title">Document-Isolation-Policy</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types/#CG-DRAFT">Draft Community Group Report</a>, <time class="dt-updated" datetime="2025-04-23">23 April 2025</time></p>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://github.com/WICG/document-isolation-policy">https://github.com/WICG/document-isolation-policy</a>
<dt>Issue Tracking:
<dd><a href="https://github.com/WICG/document-isolation-policy/issues/">GitHub</a>
<dt class="editor">Editor:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:clamy@google.com">Camille Lamy</a> (<span class="p-org org">Google</span>)
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright">©2024, Google, Inc. All rights reserved.</p>
<hr title="Separator for header">
</div>
<div class="p-summary" data-fill-with="abstract">
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<p>This proposal explores a new header, "Document-Isolation-Policy", that
enables crossOriginIsolation for the document, without relying on COOP and
COEP. In turns, this gives access to COI-gated APIs such as SharedArrayBuffers.</p>
</div>
<div data-fill-with="at-risk"></div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p> This specification was published by the <a href="https://www.w3.org/community/wicg/">Web Platform Incubator Community Group</a>.
It is not a W3C Standard nor is it on the W3C Standards Track.
Please note that under the <a href="https://www.w3.org/community/about/agreements/cla/">W3C Community Contributor License Agreement (CLA)</a> there is a limited opt-out and other conditions apply.
Learn more about <a href="http://www.w3.org/community/">W3C Community and Business Groups</a>. </p>
<p></p>
</div>
<div data-fill-with="at-risk"></div>
<nav data-fill-with="table-of-contents" id="toc">
<h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<ol class="toc" role="directory">
<li>
<a href="#introduction"><span class="secno">1</span> <span class="content">Introduction</span></a>
<ol class="toc">
<li><a href="#recommended-readings"><span class="secno">1.1</span> <span class="content">Recommended readings</span></a>
</ol>
<li>
<a href="#dip-html"><span class="secno">2</span> <span class="content">Integration with HMTL</span></a>
<ol class="toc">
<li>
<a href="#dip-supporting-concepts"><span class="secno">2.1</span> <span class="content">Supporting concepts when loading web pages</span></a>
<ol class="toc">
<li>
<a href="#dip"><span class="secno">2.1.1</span> <span class="content">Cross-origin-opener-policies</span></a>
<ol class="toc">
<li><a href="#dip-bcg-switch"><span class="secno">2.1.1.1</span> <span class="content">Browsing context group switches due to cross-origin opener policy</span></a>
</ol>
<li>
<a href="#dip-dip"><span class="secno">2.1.2</span> <span class="content">Document Isolation Policies</span></a>
<ol class="toc">
<li><a href="#dip-headers"><span class="secno">2.1.2.1</span> <span class="content">The headers</span></a>
</ol>
<li><a href="#dip-policy-containers"><span class="secno">2.1.3</span> <span class="content">Policy containers</span></a>
</ol>
<li>
<a href="#dip-browsing-contexts"><span class="secno">2.2</span> <span class="content">Browsing contexts</span></a>
<ol class="toc">
<li><a href="#dip-bc"><span class="secno">2.2.1</span> <span class="content">Browsing contexts</span></a>
<li><a href="#dip-grouping-of-browsing-contexts"><span class="secno">2.2.2</span> <span class="content">Grouping of browsing contexts</span></a>
</ol>
<li>
<a href="#dip-document-lifecycle"><span class="secno">2.3</span> <span class="content">Document lifecycle</span></a>
<ol class="toc">
<li><a href="#dip-document-creation"><span class="secno">2.3.1</span> <span class="content">Shared document creation infrastructure</span></a>
</ol>
<li><a href="#dip-agent-clusters"><span class="secno">2.4</span> <span class="content">Agents and agent clusters</span></a>
</ol>
<li>
<a href="#dip-fetch"><span class="secno">3</span> <span class="content">Integration with Fetch</span></a>
<ol class="toc">
<li><a href="#dip-requests"><span class="secno">3.1</span> <span class="content">Requests</span></a>
<li><a href="#dip-corp"><span class="secno">3.2</span> <span class="content">'Cross-Origin-Resource-Policy' header</span></a>
<li><a href="#dip-http-fetch"><span class="secno">3.3</span> <span class="content">HTTP-network-or-cache fetch</span></a>
</ol>
<li><a href="#dip-security"><span class="secno">4</span> <span class="content">Security considerations</span></a>
<li><a href="#dip-privacy"><span class="secno">5</span> <span class="content">Privacy considerations</span></a>
<li>
<a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ol class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ol>
<li>
<a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ol class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ol>
</ol>
</nav>
<main>
<h2 class="heading settled" data-level="1" id="introduction"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#introduction"></a></h2>
<p><em>This section is not normative.</em></p>
<h3 class="heading settled" data-level="1.1" id="recommended-readings"><span class="secno">1.1. </span><span class="content">Recommended readings</span><a class="self-link" href="#recommended-readings"></a></h3>
<ul>
<li data-md>
<p>The <a data-link-type="biblio" href="#biblio-explainer" title="Document-Isolation-Policy explainer">[explainer]</a> for Document-Isolation-Policy.</p>
<li data-md>
<p>The <a data-link-type="biblio" href="#biblio-spectre" title="Spectre Attacks: Exploiting Speculative Execution">[Spectre]</a> vulnerability.</p>
<li data-md>
<p>The <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-opener-policies" id="ref-for-cross-origin-opener-policies">Cross-Origin-Opener-Policy</a> (<a data-link-type="dfn" data-refhint-key="776ed7cb" href="https://html.spec.whatwg.org/C/#cross-origin-opener-policies" id="ref-for-cross-origin-opener-policies①">COOP</a>) section of the HTML spec.</p>
<li data-md>
<p>The <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#coep" id="ref-for-coep">Cross-Origin-Embedder-Policy</a> (<a data-link-type="dfn" data-refhint-key="fb08834f" href="https://html.spec.whatwg.org/C/#coep" id="ref-for-coep①">COEP</a>) section of the HTML spec.</p>
<li data-md>
<p>How and why <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-opener-policies" id="ref-for-cross-origin-opener-policies②">Cross-Origin-Opener-Policy</a> (<a data-link-type="dfn" data-refhint-key="776ed7cb" href="https://html.spec.whatwg.org/C/#cross-origin-opener-policies" id="ref-for-cross-origin-opener-policies③">COOP</a>) and <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#coep" id="ref-for-coep②">Cross-Origin-Embedder-Policy</a> (<a data-link-type="dfn" data-refhint-key="fb08834f" href="https://html.spec.whatwg.org/C/#coep" id="ref-for-coep③">COEP</a>) are granting the <a href="concept-settings-object-cross-origin-isolated-capability">crossOriginIsolated</a> capability. See <a data-link-type="biblio" href="#biblio-whycoopcoep" title="Why you need "cross-origin isolated" for powerful features">[WhyCoopCoep]</a>.</p>
</ul>
<h2 class="heading settled" data-level="2" id="dip-html"><span class="secno">2. </span><span class="content">Integration with HMTL</span><a class="self-link" href="#dip-html"></a></h2>
<p>This section defines a monkey-patch over <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a>.</p>
<h3 class="heading settled" data-level="2.1" id="dip-supporting-concepts"><span class="secno">2.1. </span><span class="content">Supporting concepts when loading web pages</span><a class="self-link" href="#dip-supporting-concepts"></a></h3>
<h4 class="heading settled" data-level="2.1.1" id="dip"><span class="secno">2.1.1. </span><span class="content">Cross-origin-opener-policies</span><a class="self-link" href="#dip"></a></h4>
<p>Modify the definition of "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#coop-same-origin-plus-coep" id="ref-for-coop-same-origin-plus-coep">same-origin-plus-coep</a>":</p>
<div class="monkey-patch">
<p>This behaves the same as "same-origin", with the addition that it sets the
(new) <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#top-level-browsing-context" id="ref-for-top-level-browsing-context">top-level browsing context</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#browsing-context-group" id="ref-for-browsing-context-group">group</a>’s <a data-link-type="dfn" href="#bcg-coi-key" id="ref-for-bcg-coi-key">agent cluster cross-origin isolation key</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#bcg-cross-origin-isolation" id="ref-for-bcg-cross-origin-isolation">cross-origin isolation mode</a> to one of "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-isolation-logical" id="ref-for-cross-origin-isolation-logical">logical</a>" or "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-isolation-concrete" id="ref-for-cross-origin-isolation-concrete">concrete</a>".</p>
</div>
<h5 class="heading settled" data-level="2.1.1.1" id="dip-bcg-switch"><span class="secno">2.1.1.1. </span><span class="content">Browsing context group switches due to cross-origin opener policy</span><a class="self-link" href="#dip-bcg-switch"></a></h5>
<p>Modify step 4 of the <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#obtain-browsing-context-navigation" id="ref-for-obtain-browsing-context-navigation">obtain a browsing context to use for a navigation response</a> algorithm:</p>
<div class="monkey-patch">
<ol start="4">
<li data-md>
<p>If <em>navigationCOOP</em>'s value is "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#coop-same-origin-plus-coep" id="ref-for-coop-same-origin-plus-coep①">same-origin-plus-COEP</a>", then:</p>
<ol>
<li data-md>
<p>Let <em>crossOriginIsolationMode</em> be either "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-isolation-logical" id="ref-for-cross-origin-isolation-logical①">logical</a>" or "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-isolation-concrete" id="ref-for-cross-origin-isolation-concrete①">concrete</a>".
The choice of which is implementation-defined.</p>
<li data-md>
<p>Set <em>newBrowsingContext</em>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#browsing-context-group" id="ref-for-browsing-context-group①">group</a>’s <a data-link-type="dfn" href="#bcg-coi-key" id="ref-for-bcg-coi-key①">agent cluster cross-origin isolation key</a> to
{<em>coopEnforcementResult</em>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#concept-origin" id="ref-for-concept-origin">origin</a>, <em>crossOriginIsolationMode</em>}.</p>
</ol>
</ol>
</div>
<h4 class="heading settled" data-level="2.1.2" id="dip-dip"><span class="secno">2.1.2. </span><span class="content">Document Isolation Policies</span><a class="self-link" href="#dip-dip"></a></h4>
<p>Add a new subsection to the <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#loading-web-pages-supporting-concepts" id="ref-for-loading-web-pages-supporting-concepts">loading web pages supporting concepts</a> section
of the HTML spec.</p>
<div class="monkey-patch">
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-value" data-noexport id="dip-value">document isolation policy value</dfn> is one of three
strings that controls <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters" id="ref-for-sec-agent-clusters">agent cluster</a> allocation and the fetching of
cross-origin resources without explicit permission from resource owners.</p>
<ul>
<li data-md>
<p>"<dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-none" data-noexport id="dip-none">none</dfn>":
This is the default value. When this value is used, cross-origin resources
can be fetched without giving explicit permission through the <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#cors-protocol" id="ref-for-cors-protocol">CORS protocol</a> or the '<a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#http-cross-origin-resource-policy" id="ref-for-http-cross-origin-resource-policy">Cross-Origin-Resource-Policy</a>' header. The document is
assigned to a non cross-origin isolated <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters" id="ref-for-sec-agent-clusters①">agent cluster</a>.</p>
<li data-md>
<p>"<dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-isolate-and-require-corp" data-noexport id="dip-isolate-and-require-corp">isolate-and-require-corp</dfn>":
When this value is used, fetching cross-origin resources requires the
server’s explicit permission through the <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#cors-protocol" id="ref-for-cors-protocol①">CORS protocol</a> or the
'<a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#http-cross-origin-resource-policy" id="ref-for-http-cross-origin-resource-policy①">Cross-Origin-Resource-Policy</a>' header. The document is also assigned to a
cross-origin isolated <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters" id="ref-for-sec-agent-clusters②">agent cluster</a>.</p>
<li data-md>
<p>"<dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-isolate-and-credentialless" data-noexport id="dip-isolate-and-credentialless">isolate-and-credentialless</dfn>":
When this value is used, fetching cross-origin no-CORS resources omits
credentials. In exchange, an explicit '<a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#http-cross-origin-resource-policy" id="ref-for-http-cross-origin-resource-policy②">Cross-Origin-Resource-Policy</a>'
header is not required. Other requests sent with credentials require the
server’s explicit permission through the <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#cors-protocol" id="ref-for-cors-protocol②">CORS protocol</a> or the
'<a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#http-cross-origin-resource-policy" id="ref-for-http-cross-origin-resource-policy③">Cross-Origin-Resource-Policy</a>' header. The document is also assigned to a
cross-origin isolated <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters" id="ref-for-sec-agent-clusters③">agent cluster</a>.</p>
</ul>
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-struct" data-noexport id="dip-struct">document isolation policy</dfn> consists of:</p>
<ul>
<li data-md>
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-struct-value" data-noexport id="dip-struct-value">value</dfn>, which is a <a data-link-type="dfn" href="#dip-value" id="ref-for-dip-value">document
isolation policy value</a>, initially "<a data-link-type="dfn" href="#dip-none" id="ref-for-dip-none">none</a>.</p>
<li data-md>
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-reporting-endpoint" data-noexport id="dip-reporting-endpoint">reporting endpoint</dfn>, initially the
empty string.</p>
<li data-md>
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-report-only-value" data-noexport id="dip-report-only-value">report-only value</dfn>, which is a <a data-link-type="dfn" href="#dip-value" id="ref-for-dip-value①">document
isolation policy value</a>, initially "<a data-link-type="dfn" href="#dip-none" id="ref-for-dip-none①">none</a>.</p>
<li data-md>
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-report-only-endpoint" data-noexport id="dip-report-only-endpoint">report-only reporting endpoint</dfn>,
initially the empty string.</p>
</ul>
<p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="obtain-coi-key" data-noexport id="obtain-coi-key">obtain a cross-origin agent cluster isolation
key</dfn> given null or a <a data-link-type="dfn" href="#dip-struct" id="ref-for-dip-struct">document isolation policy</a> <em>documentIsolationPolicy</em> and an <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#concept-origin" id="ref-for-concept-origin①">origin</a> <em>origin</em>:</p>
<ol>
<li data-md>
<p>If <em>documentIsolationPolicy</em> is null, return null.</p>
<li data-md>
<p>If <em>documentIsolationPolicy</em>'s <a data-link-type="dfn" href="#dip-struct-value" id="ref-for-dip-struct-value">value</a> is
"<a data-link-type="dfn" href="#dip-none" id="ref-for-dip-none②">none</a>", then return null.</p>
<li data-md>
<p>Let <em>crossOriginIsolationMode</em> be either "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-isolation-logical" id="ref-for-cross-origin-isolation-logical②">logical</a>" or "<a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#cross-origin-isolation-concrete" id="ref-for-cross-origin-isolation-concrete②">concrete</a>".
The choice of which is implementation-defined.</p>
<li data-md>
<p>Let <em>crossOriginIsolationKey</em> be a new <a data-link-type="dfn" href="#coi-agent-cluster-key" id="ref-for-coi-agent-cluster-key">agent cluster
cross-origin isolation key</a>.</p>
<li data-md>
<p>Set <em>crossOriginIsolationKey</em> to {<em>origin</em>, <em>crossOriginIsolationMode</em>}.</p>
<li data-md>
<p>Return <em>crossOriginIsolationKey</em>.</p>
</ol>
<h5 class="heading settled" data-level="2.1.2.1" id="dip-headers"><span class="secno">2.1.2.1. </span><span class="content">The headers</span><a class="self-link" href="#dip-headers"></a></h5>
<p>The '<dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-header" data-noexport id="dip-header">Document-Isolation-Policy</dfn>' and
'<dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="dip-report-only-header" data-noexport id="dip-report-only-header">Document-Isolation-Policy-Report-Only</dfn>'
HTTP response headers allow a server to declare a <a data-link-type="dfn" href="#dip-struct" id="ref-for-dip-struct①">document isolation
policy</a> for a <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#clone-a-node-document" id="ref-for-clone-a-node-document">document</a>. These headers are <a data-link-type="dfn" href="https://httpwg.org/specs/rfc8941.html#specify" id="ref-for-specify">structured headers</a> whose values
must be <a data-link-type="dfn" href="https://httpwg.org/specs/rfc8941.html#token" id="ref-for-token">token</a>.</p>
<p>The valid <a data-link-type="dfn" href="https://httpwg.org/specs/rfc8941.html#token" id="ref-for-token①">token</a> values are the <a data-link-type="dfn" href="#dip-value" id="ref-for-dip-value②">document isolation policy
values</a>. The token may also have attached <a data-link-type="dfn" href="https://mimesniff.spec.whatwg.org/#parameters" id="ref-for-parameters">parameters</a>; of these, the
"report-to" parameter can have a <a data-link-type="dfn" href="https://url.spec.whatwg.org/#valid-url-string" id="ref-for-valid-url-string">valid URL string</a> identifying an
appropriate reporting endpoint.</p>
<p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="obtain-dip" data-noexport id="obtain-dip">obtain a document isolation policy</dfn> given a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response" id="ref-for-concept-response">response</a> <em>response</em> and an <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#environment" id="ref-for-environment">environment</a> <em>environment</em>:</p>
<ol>
<li data-md>
<p>Let <em>policy</em> be a new <a data-link-type="dfn" href="#dip-struct" id="ref-for-dip-struct②">document isolation policy</a>.</p>
<li data-md>
<p>If <em>environment</em> is a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#non-secure-context" id="ref-for-non-secure-context">non-secure context</a>, then return <em>policy</em>.</p>
<li data-md>
<p>Let <em>parsedItem</em> be the result of <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-header-list-get-structured-header" id="ref-for-concept-header-list-get-structured-header">getting a structured field value</a> with <code>Document-Isolation-Policy</code> and "item" from <em>response</em>'s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-header-list" id="ref-for-concept-response-header-list">header list</a>.</p>
<li data-md>
<p>If <em>parsedItem</em> is non-null:</p>
<ol>
<li data-md>
<p>If <em>parsedItem</em>[0] is
"<a data-link-type="dfn" href="#dip-isolate-and-require-corp" id="ref-for-dip-isolate-and-require-corp">isolate-and-require-corp</a>" or
"<a data-link-type="dfn" href="#dip-isolate-and-credentialless" id="ref-for-dip-isolate-and-credentialless">isolate-and-credentialless</a>", set <em>policy</em>'s <a data-link-type="dfn" href="#dip-struct-value" id="ref-for-dip-struct-value①">value</a> to <em>parsedItem</em>[0].</p>
<li data-md>
<p>If <em>parsedItem</em>[1]["report-to"] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists">exists</a>, then set <em>policy</em>'s <a data-link-type="dfn" href="#dip-reporting-endpoint" id="ref-for-dip-reporting-endpoint">reporting endpoint</a> to <em>parsedItem</em>[1]["report-to"].</p>
</ol>
<li data-md>
<p>Set <em>parsedItem</em> be the result of <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-header-list-get-structured-header" id="ref-for-concept-header-list-get-structured-header①">getting a structured field value</a> with <code>Document-Isolation-Policyi-Report-Only</code> and "item" from <em>response</em>'s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-header-list" id="ref-for-concept-response-header-list①">header list</a>.</p>
<li data-md>
<p>If <em>parsedItem</em> is non-null:</p>
<ol>
<li data-md>
<p>If <em>parsedItem</em>[0] is
"<a data-link-type="dfn" href="#dip-isolate-and-require-corp" id="ref-for-dip-isolate-and-require-corp①">isolate-and-require-corp</a>" or
"<a data-link-type="dfn" href="#dip-isolate-and-credentialless" id="ref-for-dip-isolate-and-credentialless①">isolate-and-credentialless</a>", set <em>policy</em>'s <a data-link-type="dfn" href="#dip-report-only-value" id="ref-for-dip-report-only-value">report-only value</a> to <em>parsedItem</em>[0].</p>
<li data-md>
<p>If <em>parsedItem</em>[1]["report-to"] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists①">exists</a>, then set <em>policy</em>'s <a data-link-type="dfn" href="#dip-report-only-endpoint" id="ref-for-dip-report-only-endpoint">report-only reporting endpoint</a> to <em>parsedItem</em>[1]["report-to"].</p>
</ol>
<li data-md>
<p>Return policy.</p>
</ol>
</div>
<h4 class="heading settled" data-level="2.1.3" id="dip-policy-containers"><span class="secno">2.1.3. </span><span class="content">Policy containers</span><a class="self-link" href="#dip-policy-containers"></a></h4>
<p>Add the following members to the <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#policy-container" id="ref-for-policy-container">policy container</a> struct:</p>
<div class="monkey-patch">
<ul>
<li data-md>
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="policy-container-dip" data-noexport id="policy-container-dip">document isolation policy</dfn>, which is a <a data-link-type="dfn" href="#dip-struct" id="ref-for-dip-struct③">document isolation policy</a>. It is initially a new <a data-link-type="dfn" href="#dip-struct" id="ref-for-dip-struct④">document isolation policy</a>.</p>
<li data-md>
<p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="policy-container-coi-key" data-noexport id="policy-container-coi-key">agent cluster cross-origin isolation
key</dfn>, which is null or an <a data-link-type="dfn" href="#coi-agent-cluster-key" id="ref-for-coi-agent-cluster-key①">agent cluster
cross-origin isolation key</a>. It is initially null. This <a data-link-type="dfn" href="#coi-agent-cluster-key" id="ref-for-coi-agent-cluster-key②">agent cluster cross-origin isolation key</a> is based
on the <a data-link-type="dfn" href="#dip-struct" id="ref-for-dip-struct⑤">document isolation policy</a> of the document. It overrides the <a data-link-type="dfn" href="#bcg-coi-key" id="ref-for-bcg-coi-key②">agent cluster cross-origin isolation key</a> stored in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/C/#browsing-context-group" id="ref-for-browsing-context-group②">browsing context group</a>.</p>
</ul>
</div>
<p>Add step 5 and 6 to the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#clone-a-policy-container" id="ref-for-clone-a-policy-container">clone a policy container</a> algorithm:</p>
<div class="monkey-patch">
<ol start="5">
<li data-md>
<p>Set <em>clone</em>'s <a data-link-type="dfn" href="#policy-container-dip" id="ref-for-policy-container-dip">document isolation policy</a> to a copy
of <em>policyContainer</em>'s <a data-link-type="dfn" href="#policy-container-dip" id="ref-for-policy-container-dip①">document isolation policy</a>.</p>
<li data-md>
<p>Set <em>clone</em>'s <a data-link-type="dfn" href="#policy-container-coi-key" id="ref-for-policy-container-coi-key">agent cluster cross-origin
isolation key</a> to a copy of <em>policyContainer</em>'s <a data-link-type="dfn" href="#policy-container-coi-key" id="ref-for-policy-container-coi-key①">agent cluster cross-origin isolation key</a>.</p>
</ol>
</div>
<p>Add step 6 and 7 to the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#creating-a-policy-container-from-a-fetch-response" id="ref-for-creating-a-policy-container-from-a-fetch-response">create a policy container from a fetch response</a>:</p>
<div class="monkey-patch">
<ol start="6">
<li data-md>
<p>If <em>environment</em> is non-null, then set <em>result</em>'s <a data-link-type="dfn" href="#policy-container-dip" id="ref-for-policy-container-dip②">document isolation policy</a> to the result of <a data-link-type="dfn" href="#obtain-dip" id="ref-for-obtain-dip">obatining a document isolation policy</a> given <em>response</em> and <em>environment</em>.</p>