Skip to content

Commit

Permalink
Rephrase
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Jan 11, 2024
1 parent 4bf7e4b commit 6098c73
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -9687,9 +9687,10 @@ from other interfaces. Specifically:
will correspond to properties on the object itself rather than on
[=interface prototype objects=].

A [=realm=] can be defined to
<dfn export for="realm" lt="has a mutable global prototype chain">have a mutable global prototype chain</dfn>.
If a [=realm=] is not defined as such, the prototype of its global object can not be changed.
All [=realms=] have a <dfn export for="realm">is global prototype chain mutable</dfn> flag,
which can be set when the [=realm=] is created.
The value of the flag can not change during the lifetime of the [=realm=].
By default the flag is set to false.

<div class="note">

Expand Down Expand Up @@ -11502,7 +11503,7 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
1. Otherwise, set |proto| to |realm|.\[[Intrinsics]].[[{{%Object.prototype%}}]].
1. Assert: <a abstract-op>Type</a>(|proto|) is Object.
1. Let |interfaceProtoObj| be null.
1. If |realm| [=realm/has a mutable global prototype chain=], then:
1. If |realm|'s [=is global prototype chain mutable=] is true, then:
1. Set |interfaceProtoObj| to [$OrdinaryObjectCreate$](|proto|).
1. Otherwise, if |interface| is declared with the [{{Global}}] [=extended attribute=], or
|interface| is in the set of [=inherited interfaces=] of an interface
Expand Down Expand Up @@ -11682,7 +11683,7 @@ is the concatenation of the [=interface=]'s
When the \[[SetPrototypeOf]] internal method of a [=named properties object=] |O| is called with
ECMAScript language value |V|, the following step is taken:

1. If |O|'s [=associated realm=] [=realm/has a mutable global prototype chain=],
1. If |O|'s [=associated realm=]'s [=is global prototype chain mutable=] is true,
return [=?=] [$OrdinarySetPrototypeOf$](|O|, |V|).
1. Return [=?=] <a abstract-op>SetImmutablePrototype</a>(|O|, |V|).

Expand Down Expand Up @@ -13502,7 +13503,7 @@ Issue: Define those properties imperatively instead.
[=interface=] with the [{{Global}}] [=extended attribute=] is called with
ECMAScript language value |V|, the following step is taken:

1. If |O|'s [=associated realm=] [=realm/has a mutable global prototype chain=],
1. If |O|'s [=associated realm=]'s [=is global prototype chain mutable=] is true,
return [=?=] [$OrdinarySetPrototypeOf$](|O|, |V|).
1. Return [=?=] <a abstract-op>SetImmutablePrototype</a>(|O|, |V|).

Expand Down

0 comments on commit 6098c73

Please sign in to comment.