@@ -2899,6 +2899,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2899
2899
<li>The <dfn data-x="js-HostCallJobCallback" data-x-href="https://tc39.es/ecma262/#sec-hostcalljobcallback">HostCallJobCallback</dfn> abstract operation</li>
2900
2900
<li>The <dfn data-x="js-HostEnqueueFinalizationRegistryCleanupJob" data-x-href="https://tc39.es/ecma262/#sec-host-cleanup-finalization-registry">HostEnqueueFinalizationRegistryCleanupJob</dfn> abstract operation</li>
2901
2901
<li>The <dfn data-x="js-HostEnqueuePromiseJob" data-x-href="https://tc39.es/ecma262/#sec-hostenqueuepromisejob">HostEnqueuePromiseJob</dfn> abstract operation</li>
2902
+ <li>The <dfn data-x="js-HostEnsureCanAddPrivateElement" data-x-href="https://tc39.es/ecma262/#sec-hostensurecanaddprivateelement">HostEnsureCanAddPrivateElement</dfn> abstract operation</li>
2902
2903
<li>The <dfn data-x="js-HostEnsureCanCompileStrings" data-x-href="https://tc39.es/ecma262/#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</dfn> abstract operation</li>
2903
2904
<li>The <dfn data-x="js-HostImportModuleDynamically" data-x-href="https://tc39.es/proposal-dynamic-import/#sec-hostimportmoduledynamically">HostImportModuleDynamically</dfn> abstract operation</li>
2904
2905
<li>The <dfn data-x="js-HostMakeJobCallback" data-x-href="https://tc39.es/ecma262/#sec-hostmakejobcallback">HostMakeJobCallback</dfn> abstract operation</li>
@@ -94762,6 +94763,28 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
94762
94763
operations, that vary depending on the host environment. This section defines them for user
94763
94764
agent hosts.</p>
94764
94765
94766
+ <h5 id="the-hostensurecanaddprivateelement-implementation"><dfn>HostEnsureCanAddPrivateElement</dfn>(<var>O</var>)</h5>
94767
+
94768
+ <p>JavaScript contains an <span>implementation-defined</span> <span
94769
+ data-x="js-HostEnsureCanAddPrivateElement">HostEnsureCanAddPrivateElement</span>(<var>O</var>)
94770
+ abstract operation. User agents must use the following implementation: <ref spec=JAVASCRIPT>
94771
+
94772
+ <ol>
94773
+ <li><p>If <var>O</var> is a <code>WindowProxy</code> object, or <span>implements</span>
94774
+ <code>Location</code>, then return Completion { [[Type]]: throw, [[Value]]: a new
94775
+ <code>TypeError</code> }.</li>
94776
+
94777
+ <li><p>Return <span>NormalCompletion</span>(unused).</p></li>
94778
+ </ol>
94779
+
94780
+ <p class="note">JavaScript private fields can be applied to arbitrary objects. Since this can
94781
+ dramatically complicate implementation for particularly-exotic host objects, the JavaScript
94782
+ language specification provides this hook to allow hosts to reject private fields on objects
94783
+ meeting a host-defined criteria. In the case of HTML, <code>WindowProxy</code> and
94784
+ <code>Location</code> have complicated semantics — particularly around navigation and
94785
+ security — that make implementation of private field semantics challenging, so our
94786
+ implementation simply rejects those objects.</p>
94787
+
94765
94788
<h5><dfn data-x="the-hostensurecancompilestrings-implementation">HostEnsureCanCompileStrings</dfn>(<var>realm</var>)</h5>
94766
94789
94767
94790
<p>JavaScript contains an <span>implementation-defined</span> <span
@@ -128677,6 +128700,7 @@ INSERT INTERFACES HERE
128677
128700
Matt Falkenhagen,
128678
128701
Matt Schmidt,
128679
128702
Matt Wright,
128703
+ Matthew Gaudet, <!-- mgaudet on GitHub -->
128680
128704
Matthew Gregan,
128681
128705
Matthew Mastracci,
128682
128706
Matthew Noorenberghe,
0 commit comments