Skip to content

Commit

Permalink
Editorial tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic authored and sideshowbarker committed Jan 31, 2021
1 parent 712e030 commit e81af55
Showing 1 changed file with 25 additions and 28 deletions.
53 changes: 25 additions & 28 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -89607,11 +89607,11 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {

<h5 id="integration-with-javascript-jobs">Job-related host hooks</h5>

<p>The JavaScript specification defines Jobs to be scheduled and run later by the host, as well
as JobCallback Records which encapsulate JavaScript functions that are called as part of
jobs. The JavaScript specification contains a number of <span>implementation-defined</span>
abstract operations that lets the host define how Jobs are scheduled and how JobCallbacks are
handled. This section defines them for user agent hosts.</p>
<p>The JavaScript specification defines Jobs to be scheduled and run later by the host, as well as
<span data-x="JobCallback Record">JobCallback Records</span> which encapsulate JavaScript
functions that are called as part of jobs. The JavaScript specification contains a number of
<span>implementation-defined</span> abstract operations that lets the host define how jobs are
scheduled and how JobCallbacks are handled. This section defines them for user agent hosts.</p>

<h6 id="hostcalljobcallback"><dfn>HostCallJobCallback</dfn>(<var>callback</var>, <var>V</var>,
<var>argumentsList</var>)</h6>
Expand All @@ -89625,7 +89625,7 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {

<ol>
<li><p>Let <var>incumbent settings</var> be
<var>callback</var>.[[HostDefined]].[[IncumbentSettings]]</p></li>
<var>callback</var>.[[HostDefined]].[[IncumbentSettings]].</p></li>

<li><p>Let <var>script execution context</var> be
<var>callback</var>.[[HostDefined]].[[ActiveScriptContext]].</li>
Expand All @@ -89642,21 +89642,18 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
push">push</span> <var>script execution context</var> onto the <span>JavaScript execution
context stack</span>.</p>

<p class="note">This affects the <span>active script</span> while the callback
runs. <span>HostMakeJobCallback</span> saves the appropriate <span>JavaScript execution
context</span>.</p>
<p class="note">This affects the <span>active script</span> while the callback runs.</p>
</li>

<li>
<p>Let <var>result</var> be Call(<var>callback</var>.[[Callback]], <var>V</var>, <var>argumentsList</var>).</p>
</li>
<li><p>Let <var>result</var> be <span>Call</span>(<var>callback</var>.[[Callback]], <var>V</var>,
<var>argumentsList</var>).</p></li>

<li><p>If <var>script execution context</var> is not null, then <span data-x="stack
pop">pop</span> <var>script execution context</var> from the <span>JavaScript execution context
stack</span>.</p></li>
pop">pop</span> <var>script execution context</var> from the <span>JavaScript execution context
stack</span>.</p></li>

<li><p><span>Clean up after running a callback</span> with <var>incumbent
settings</var>.</p></li>
settings</var>.</p></li>

<li><p>Return <var>result</var>.</p></li>
</ol>
Expand Down Expand Up @@ -89712,12 +89709,12 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
<p>Let <var>result</var> be <var>job</var>().</p>

<p class="note"><var>job</var> is an <span>abstract closure</span> returned by
<span>NewPromiseReactionJob</span> or <span>NewPromiseResolveThenableJob</span>. The
promise's handler function when <var>job</var> is returned by
<span>NewPromiseReactionJob</span>, and the <code data-x="">then</code> function when
<var>job</var> is returned by <span>NewPromiseResolveThenableJob</span>, are wrapped in
<span>JobCallback Record</span>s. HTML saves the <span>incumbent settings object</span> and a
<span>JavaScript execution context</span> for to the <span>active script</span> in
<span>NewPromiseReactionJob</span> or <span>NewPromiseResolveThenableJob</span>. The promise's
handler function when <var>job</var> is returned by <span>NewPromiseReactionJob</span>, and
the <code data-x="">then</code> function when <var>job</var> is returned by
<span>NewPromiseResolveThenableJob</span>, are wrapped in <span data-x="JobCallback
Record">JobCallback Records</span>. HTML saves the <span>incumbent settings object</span> and
a <span>JavaScript execution context</span> for to the <span>active script</span> in
<span>HostMakeJobCallback</span> and restores them in <span>HostCallJobCallback</span>.</p>
</li>

Expand All @@ -89736,10 +89733,10 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
data-x="js-HostMakeJobCallback">HostMakeJobCallback</span>(<var>callable</var>) abstract operation
to let hosts attach state to JavaScript callbacks that are called from inside <span
data-x="concept-task">task</span>s. HTML <span
id="incumbent-settings-object-tracking-in-promises">tracks incumbent settings object in
Promises</span> by saving the <span>incumbent settings object</span> and a <span>JavaScript
execution context</span> for the <span>active script</span>. User agents must use the following
implementation: <ref spec=JAVASCRIPT></p>
id="incumbent-settings-object-tracking-in-promises">tracks the <span>incumbent settings
object</span> in promises</span> by saving the <span>incumbent settings object</span> and a
<span>JavaScript execution context</span> for the <span>active script</span>. User agents must use
the following implementation: <ref spec=JAVASCRIPT></p>

<ol>
<li><p>Let <var>incumbent settings</var> be the <span>incumbent settings object</span>.</p></li>
Expand Down Expand Up @@ -89794,9 +89791,9 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
</div>
</li>

<li><p>Return the JobCallback Record { [[Callback]]: <var>callable</var>, [[HostDefined]]: {
[[IncumbentSettings]]: <var>incumbent settings</var>, [[ActiveScriptContext]]: <var>script
execution context</var> } }.</p></li>
<li><p>Return the <span>JobCallback Record</span> { [[Callback]]: <var>callable</var>,
[[HostDefined]]: { [[IncumbentSettings]]: <var>incumbent settings</var>, [[ActiveScriptContext]]:
<var>script execution context</var> } }.</p></li>
</ol>

<h5 id="integration-with-the-javascript-module-system">Module-related host hooks</h5>
Expand Down

0 comments on commit e81af55

Please sign in to comment.