@@ -9402,16 +9402,16 @@ The [{{Exposed}}] [=extended attribute=] must either
9402
9402
[=takes a wildcard|take a wildcard=].
9403
9403
Each of the identifiers mentioned must be a [=global name=] of some [=interface=] and be unique.
9404
9404
9405
- The <dfn>own exposure set</dfn> is the [=/set=] of identifiers defined as follows:
9405
+ The <dfn>own exposure set</dfn> is either a [=/set=] of identifiers or the special value
9406
+ <code>*</code>, defined as follows:
9406
9407
9407
9408
<dl class="switch">
9408
9409
: If the [{{Exposed}}] [=extended attribute=] [=takes an identifier=] |I|
9409
9410
:: The [=own exposure set=] is the [=/set=] « |I| ».
9410
9411
: If the [{{Exposed}}] [=extended attribute=] [=takes an identifier list=] |I|
9411
9412
:: The [=own exposure set=] is the [=/set=] |I|.
9412
9413
: If the [{{Exposed}}] [=extended attribute=] [=takes a wildcard=]
9413
- :: The [=own exposure set=] is the [=/set=] of all [=global names=] of all [=interfaces=]
9414
- which have the [{{Global}}] [=extended attribute=].
9414
+ :: The [=own exposure set=] is <code>*</code>.
9415
9415
</dl>
9416
9416
9417
9417
<p class="advisement">
@@ -9421,6 +9421,23 @@ The <dfn>own exposure set</dfn> is the [=/set=] of identifiers defined as follow
9421
9421
it is preferred to list the globals explicitly.
9422
9422
</p>
9423
9423
9424
+ <div algorithm>
9425
+
9426
+ The <dfn>exposure set intersection</dfn> of a construct |C| and interface-or-null |H| is defined as
9427
+ follows:
9428
+
9429
+ 1. Assert: |C| is an [=interface member=], [=interface mixin member=], [=namespace member=],
9430
+ [=partial interface=], [=partial interface mixin=], [=partial namespace=], or
9431
+ [=interface mixin=].
9432
+ 1. Assert: |H| is an [=interface=] or null.
9433
+ 1. If |H| is null, return |C|'s [=own exposure set=].
9434
+ 1. If |C|'s [=own exposure set=] is <code>*</code>, return |H|'s [=exposure set=].
9435
+ 1. If |H|'s [=exposure set=] is <code>*</code>, return |C|'s [=own exposure set=].
9436
+ 1. Return the [=set/intersection=] of |C|'s [=own exposure set=] and |H|'s
9437
+ [=exposure set=].
9438
+
9439
+ </div>
9440
+
9424
9441
<div algorithm>
9425
9442
To get the <dfn id="dfn-exposure-set" export>exposure set</dfn> of a construct |C|,
9426
9443
run the following steps:
@@ -9429,27 +9446,23 @@ The <dfn>own exposure set</dfn> is the [=/set=] of identifiers defined as follow
9429
9446
[=interface member=], [=interface mixin member=], or [=namespace member=].
9430
9447
1. Let |H| be |C|'s [=host interface=] if |C| is an [=interface mixin member=], or null otherwise.
9431
9448
1. If |C| is an [=interface member=], [=interface mixin member=], or [=namespace member=], then:
9432
- 1. If the [{{Exposed}}] [=extended attribute=] is specified on |C|, then:
9433
- 1. If |H| is set, return the [=set/intersection=] of |C|'s [=own exposure set=]
9434
- and |H|'s [=exposure set=].
9435
- 1. Otherwise, return |C|'s [=own exposure set=].
9436
- 1. Otherwise, set |C| to be the
9449
+ 1. If the [{{Exposed}}] [=extended attribute=] is specified on |C|,
9450
+ return the [=exposure set intersection=] of |C| and |H|.
9451
+ 1. Set |C| to the
9437
9452
[=interface=], [=partial interface=],
9438
9453
[=interface mixin=], [=partial interface mixin=],
9439
9454
[=namespace=], or [=partial namespace=]
9440
9455
|C| is declared on.
9441
9456
1. If |C| is a [=partial interface=], [=partial interface mixin=], or [=partial namespace=], then:
9442
- 1. If the [{{Exposed}}] [=extended attribute=] is specified on |C|, then:
9443
- 1. If |H| is set, return the [=set/intersection=] of |C|'s [=own exposure set=]
9444
- and |H|'s [=exposure set=].
9445
- 1. Otherwise, return |C|'s [=own exposure set=].
9446
- 1. Otherwise, set |C| to be the original [=interface=], [=interface mixin=], or [=namespace=]
9447
- definition of |C|.
9457
+ 1. If the [{{Exposed}}] [=extended attribute=] is specified on |C|,
9458
+ return the [=exposure set intersection=] of |C| and |H|.
9459
+ 1. Set |C| to the original [=interface=], [=interface mixin=], or [=namespace=] definition
9460
+ of |C|.
9448
9461
1. If |C| is an [=interface mixin=], then:
9462
+ 1. Assert: |H| is not null.
9449
9463
1. If the [{{Exposed}}] [=extended attribute=] is specified on |C|,
9450
- then return the [=set/intersection=] of |C|'s [=own exposure set=]
9451
- and |H|'s [=exposure set=].
9452
- 1. Otherwise, set |C| to |H|.
9464
+ return the [=exposure set intersection=] of |C| and |H|.
9465
+ 1. Set |C| to |H|.
9453
9466
1. Assert: |C| is an [=interface=], [=callback interface=] or [=namespace=].
9454
9467
1. Assert: The [{{Exposed}}] [=extended attribute=] is specified on |C|.
9455
9468
1. Return |C|'s [=own exposure set=].
@@ -9503,8 +9516,8 @@ Otherwise, it is the [=host interface=]'s [=exposure set=].
9503
9516
<dfn id="dfn-exposed" export>exposed</dfn> in a given [=Realm=] |realm| if the following steps
9504
9517
return true:
9505
9518
9506
- 1. If |realm|.\[[GlobalObject]] does not implement an [=interface=]
9507
- that is in |construct|'s [=exposure set=], then return false.
9519
+ 1. If |construct|'s [=exposure set=] is not <code>*</code>, and |realm|.\[[GlobalObject]] does
9520
+ not implement an [=interface=] that is in |construct|'s [=exposure set=], then return false.
9508
9521
1. If |realm|'s [=Realm/settings object=] is not a [=secure context=], and |construct| is
9509
9522
[=conditionally exposed=] on [{{SecureContext}}], then return false.
9510
9523
1. If |realm|'s [=Realm/settings object=]'s
0 commit comments