Skip to content

Commit

Permalink
Normative: Match ECMA‑262 order of the constructor property
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Mar 7, 2022
1 parent f8f5650 commit b372e76
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -11602,6 +11602,9 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
to the definitions specified in
[=ECMA-262 Immutable prototype exotic objects=].
1. Otherwise, set |interfaceProtoObj| to [$OrdinaryObjectCreate$](|proto|).
1. If the [{{LegacyNoInterfaceObject}}] [=extended attribute=] was not specified on |interface|, then:
1. Let |constructor| be the [=interface object=] of |interface| in |realm|.
1. Perform [$CreateMethodProperty$](|interfaceProtoObj|, "<code>constructor</code>", |constructor|).
1. If |interface| has any [=member=] declared with the [{{Unscopable}}] [=extended attribute=],
then:

Expand All @@ -11625,12 +11628,6 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
1. [=Define the asynchronous iteration methods=] of |interface| on |interfaceProtoObj|
given |realm|.
1. [=Define the constants=] of |interface| on |interfaceProtoObj| given |realm|.
1. If the [{{LegacyNoInterfaceObject}}] [=extended attribute=] was not specified on |interface|, then:
1. Let |constructor| be the [=interface object=] of |interface| in |realm|.
1. Let |desc| be the PropertyDescriptor{\[[Writable]]: <emu-val>true</emu-val>,
\[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val>,
\[[Value]]: |constructor|}.
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, "<code>constructor</code>", |desc|).
1. Return |interfaceProtoObj|.
</div>

Expand Down

0 comments on commit b372e76

Please sign in to comment.