From f220db85e9bbe4d08306d06a4a4a99f534a8ebf5 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Wed, 5 May 2021 11:16:17 -0700 Subject: [PATCH] Normative: Clarify text about host added properties (#301) Ref #284 --- spec.html | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/spec.html b/spec.html index a9250c7..7ad788c 100644 --- a/spec.html +++ b/spec.html @@ -356,10 +356,25 @@

Runtime Semantics: HostInitializeSyntheticRealm ( _realm_ )

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. The idea of this hook is to initialize host - data structures related to the Realm, e.g., for module loading. It - is not expected that this hook would add properties to the Realm's - global object. + data structures related to the Realm, e.g., for module loading.

+

+ The host may use this hook to add properties to the Realm's global + object. Those properties must each be configurable to provide + platform capabilities with no authority to cause side effects such + as I/O or mutation of values that are shared across different + realms within the same host environment. +

+ +

+ This specification does not recommend any specific addition. + In the Web embedding, HTML and WebIDL will specify which + interfaces are included. The Web Platform and Web-like + environments may decide to include `EventTarget`, + `atob`, `TextEncoder`, `URL`, etc. while at the same time not + including `HTMLElement`, `console`, `localStorage`, `fetch`, etc.. +

+