Skip to content

Commit

Permalink
Layering: Host hook to initialize new Realms
Browse files Browse the repository at this point in the history
Part of addressing tc39#225

In HTML, this host hook would probably do something related to [setting up a window environment settings object](https://html.spec.whatwg.org/#set-up-a-window-environment-settings-object). I wouldn't propose that this would add properties to the global object in HTML.

This PR makes a new host hook section, as another hook may be needed for new modules (in the context of tc39#224)
  • Loading branch information
Daniel Ehrenberg authored Feb 28, 2020
1 parent 51a591b commit be162ce
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/index.emu
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ location: https://rawgit.com/tc39/proposal-realms/master/index.html
1. Set _O_.[[Realm]] to _realmRec_.
1. Perform ? SetRealmGlobalObject(_realmRec_, *undefined*, *undefined*).
1. Perform ? SetDefaultGlobalBindings(_O_.[[Realm]]).
1. Perform ? HostInitializeUserRealm(_O_.[[Realm]]).
1. Return _O_.
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -151,5 +152,18 @@ location: https://rawgit.com/tc39/proposal-realms/master/index.html
</emu-table>

</emu-clause>

<emu-clause id="sec-realm-host-operations">
<h1>Host operations</h1>
<emu-clause id="sec-host-initialize-user-realm">
<h1>Runtime Semantics: HostInitializeUserRealm ( _realm_ )</h1>
<p>
HostInitializerUserRealm is an implementation-defined abstract
operation used to inform the host of any newly created realms from
the Realm constructor. Its return value is not used, though it may
throw an exception.
</p>
</emu-clause>
</emu-clause>

</emu-clause>

0 comments on commit be162ce

Please sign in to comment.