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
Define the [CrossOriginIsolated] extended attribute
Web IDL currently defines a [SecureContext] extended attribute that
governs whether or not a given construct is exposed within a given
context. This patch defines a similar [CrossOriginIsolated] attribute
to govern exposure based on cross-origin isolation.
This supports the broader Securer Contexts proposal
(https://github.com/mikewest/securer-contexts), which aims to guide
spec authors to combat threats we've started paying more attention to
over the last few years.
Closes#875.
Co-authored-by: Domenic Denicola <[email protected]>
@@ -994,15 +994,17 @@ The relevant language binding determines how interfaces correspond to constructs
994
994
in the language.
995
995
996
996
The following extended attributes are applicable to interfaces:
997
+
[{{CrossOriginIsolated}}],
997
998
[{{Exposed}}],
998
999
[{{Global}}],
999
-
[{{LegacyWindowAlias}}],
1000
1000
[{{LegacyFactoryFunction}}],
1001
1001
[{{LegacyNoInterfaceObject}}],
1002
-
[{{LegacyOverrideBuiltIns}}], and
1002
+
[{{LegacyOverrideBuiltIns}}],
1003
+
[{{LegacyWindowAlias}}], and
1003
1004
[{{SecureContext}}].
1004
1005
1005
1006
The following extended attributes are applicable to [=partial interfaces=]:
1007
+
[{{CrossOriginIsolated}}],
1006
1008
[{{Exposed}}],
1007
1009
[{{LegacyOverrideBuiltIns}}], and
1008
1010
[{{SecureContext}}].
@@ -1245,7 +1247,7 @@ in the <a href="#es-namespaces">ECMAScript binding</a>.
1245
1247
Note that unlike [=interfaces=] or [=dictionaries=], [=interface mixins=] do not create types.
1246
1248
1247
1249
Of the extended attributes defined in this specification,
1248
-
only the [{{Exposed}}] and [{{SecureContext}}] extended attributes
1250
+
only the [{{CrossOriginIsolated}}], [{{Exposed}}], and [{{SecureContext}}] extended attributes
1249
1251
are applicable to [=interface mixins=].
1250
1252
1251
1253
An <dfn>includes statement</dfn> is a definition
@@ -1770,7 +1772,8 @@ on which they appear. It is language binding specific whether
1770
1772
</div>
1771
1773
1772
1774
The following extended attributes are applicable to constants:
1773
-
[{{Exposed}}],
1775
+
[{{CrossOriginIsolated}}],
1776
+
[{{Exposed}}], and
1774
1777
[{{SecureContext}}].
1775
1778
1776
1779
<pre class="grammar" id="prod-Const">
@@ -1951,8 +1954,9 @@ interface will be stringified to the value of the attribute. See
1951
1954
1952
1955
The following [=extended attributes=]
1953
1956
are applicable to regular and static attributes:
1957
+
[{{CrossOriginIsolated}}],
1954
1958
[{{Exposed}}],
1955
-
[{{SameObject}}],
1959
+
[{{SameObject}}], and
1956
1960
[{{SecureContext}}].
1957
1961
1958
1962
The following [=extended attributes=]
@@ -2403,11 +2407,12 @@ type=] that has a [=dictionary type=] in its [=flattened member types=].
2403
2407
</div>
2404
2408
2405
2409
The following extended attributes are applicable to operations:
2410
+
[{{CrossOriginIsolated}}],
2406
2411
[{{Default}}],
2407
2412
[{{Exposed}}],
2408
-
[{{NewObject}}],
2409
-
[{{SecureContext}}],
2410
-
[{{LegacyUnforgeable}}].
2413
+
[{{LegacyUnforgeable}}],
2414
+
[{{NewObject}}], and
2415
+
[{{SecureContext}}].
2411
2416
2412
2417
The <dfn>method steps</dfn> of an operation |operation| should be introduced using text of the form
2413
2418
“The <code>|operation|(<var ignore>arg1</var>, <var ignore>arg2</var>, ...)</code> method
@@ -4266,7 +4271,8 @@ must not have a
4266
4271
[=asynchronously iterable declaration=].
4267
4272
4268
4273
The following extended attributes are applicable to [=iterable declarations=]:
4269
-
[{{Exposed}}],
4274
+
[{{CrossOriginIsolated}}],
4275
+
[{{Exposed}}], and
4270
4276
[{{SecureContext}}].
4271
4277
4272
4278
<pre class="grammar" id="prod-Iterable">
@@ -4456,7 +4462,8 @@ An [=interface=] with an [=asynchronously iterable declaration=] and its [=inher
4456
4462
must not have a [=maplike declaration=], [=setlike declaration=], or [=iterable declaration=].
4457
4463
4458
4464
The following extended attributes are applicable to [=asynchronously iterable declarations=]:
4459
-
[{{Exposed}}],
4465
+
[{{CrossOriginIsolated}}],
4466
+
[{{Exposed}}], and
4460
4467
[{{SecureContext}}].
4461
4468
4462
4469
Issue: these [=extended attributes=] are not currently taken into account.
@@ -4707,7 +4714,7 @@ The order that members appear in has significance for property enumeration in th
4707
4714
4708
4715
Note that unlike interfaces or dictionaries, namespaces do not create types.
4709
4716
4710
-
Of the extended attributes defined in this specification, only the [{{Exposed}}] and [{{SecureContext}}] extended attributes are applicable to namespaces.
4717
+
Of the extended attributes defined in this specification, only the [{{CrossOriginIsolated}}], [{{Exposed}}], and [{{SecureContext}}] extended attributes are applicable to namespaces.
4711
4718
4712
4719
[=Namespaces=] must be annotated with the [{{Exposed}}] [=extended attribute=].
4713
4720
@@ -9094,6 +9101,91 @@ for the specific requirements that the use of
0 commit comments