Skip to content

Commit 7b3fafb

Browse files
committed
Normative: Match ECMA‑262 order of the constructor property
1 parent 67bc60f commit 7b3fafb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

index.bs

+3-6
Original file line numberDiff line numberDiff line change
@@ -11374,6 +11374,9 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
1137411374
to the definitions specified in
1137511375
[=ECMA-262 Immutable prototype exotic objects=].
1137611376
1. Otherwise, set |interfaceProtoObj| to [=!=] [$OrdinaryObjectCreate$](|proto|).
11377+
1. If the [{{LegacyNoInterfaceObject}}] [=extended attribute=] was not specified on |interface|, then:
11378+
1. Let |constructor| be the [=interface object=] of |interface| in |realm|.
11379+
1. Perform [=!=] [$CreateMethodProperty$](|interfaceProtoObj|, "<code>constructor</code>", |constructor|).
1137711380
1. If |interface| has any [=member=] declared with the [{{Unscopable}}] [=extended attribute=],
1137811381
then:
1137911382

@@ -11397,12 +11400,6 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
1139711400
1. [=Define the asynchronous iteration methods=] of |interface| on |interfaceProtoObj|
1139811401
given |realm|.
1139911402
1. [=Define the constants=] of |interface| on |interfaceProtoObj| given |realm|.
11400-
1. If the [{{LegacyNoInterfaceObject}}] [=extended attribute=] was not specified on |interface|, then:
11401-
1. Let |constructor| be the [=interface object=] of |interface| in |realm|.
11402-
1. Let |desc| be the PropertyDescriptor{\[[Writable]]: <emu-val>true</emu-val>,
11403-
\[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val>,
11404-
\[[Value]]: |constructor|}.
11405-
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, "<code>constructor</code>", |desc|).
1140611403
1. Return |interfaceProtoObj|.
1140711404
</div>
1140811405

0 commit comments

Comments
 (0)