@@ -12373,11 +12373,14 @@ The value of the [=function object=]’s <code class="idl">name</code> property
12373
12373
in various ways, including "|object| is an |interface| object".
12374
12374
</div>
12375
12375
12376
- Every [=platform object=] is associated with a global environment , just
12376
+ Every [=platform object=] is associated with a [=Realm=] , just
12377
12377
as the [=initial objects=] are.
12378
+ This Realm is stored in the [=platform object=]'s \[[Realm]] slot.
12378
12379
It is the responsibility of specifications using Web IDL to state
12379
- which global environment (or, by proxy, which global object) each platform
12380
+ which Realm (or, by proxy, which global object) each platform
12380
12381
object is associated with.
12382
+ In particular, the algorithms below associate the new [=platform object=] with
12383
+ the Realm given as an argument.
12381
12384
12382
12385
<div algorithm>
12383
12386
To <dfn export lt=new>create a new object implementing the interface</dfn> |interface|, with a
@@ -12403,9 +12406,10 @@ object is associated with.
12403
12406
1. Let |targetRealm| be [$GetFunctionRealm$](|newTarget|).
12404
12407
1. Set |prototype| to the [=interface prototype object=] for |interface| in
12405
12408
|targetRealm|.
12406
- 1. Let |slots| be « \[[PrimaryInterface]] ».
12409
+ 1. Let |slots| be « \[[Realm]], \[[ PrimaryInterface]] ».
12407
12410
1. Let |instance| be a newly created [=ECMAScript/object=] in |realm|
12408
12411
with an internal slot for each name in |slots|.
12412
+ 1. Set |instance|.\[[Realm]] to |realm|.
12409
12413
1. Set |instance|.\[[PrimaryInterface]] to |interface|.
12410
12414
1. Set |instance|.\[[Prototype]] to |prototype|.
12411
12415
1. Set |instance|'s essential internal methods to the definitions specified in
0 commit comments