Skip to content

Commit

Permalink
Return empty on "do not run" for running a script
Browse files Browse the repository at this point in the history
Previously, as of ad3dda5, the
algorithm returned NormalCompletion(undefined) when the script was not
run.

But the service worker script will need to distinguish between when the
script was run vs. not, for deciding whether it can proceed with
installation. The counterpart service worker spec change is:
w3c/ServiceWorker#1346.
  • Loading branch information
mfalken authored and domenic committed Aug 14, 2018
1 parent 5e43bcf commit b71f885
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -81986,8 +81986,9 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
<li><p>Let <var>evaluationStatus</var> be the result of <span data-x="run a classic
script">running the classic script</span> <var>script</var>.</p></li>

<li><p>Let <var>result</var> be undefined if <var>evaluationStatus</var> is an <span>abrupt
completion</span>, or <var>evaluationStatus</var>.[[Value]] otherwise.</p></li>
<li><p>Let <var>result</var> be undefined if <var>evaluationStatus</var> is an
<span>abrupt completion</span> or <var>evaluationStatus</var>.[[Value]] is
empty, or <var>evaluationStatus</var>.[[Value]] otherwise.</p></li>

<li><p>Let <var>response</var> be null.</p></li>

Expand Down Expand Up @@ -87381,7 +87382,7 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
<li><p>Let <var>settings</var> be the <span>settings object</span> of <var>script</var>.</p></li>

<li><p><span>Check if we can run script</span> with <var>settings</var>. If this returns "do
not run" then return <span>NormalCompletion</span>(undefined).</p></li>
not run" then return <span>NormalCompletion</span>(empty).</p></li>

<li><p><span>Prepare to run script</span> given <var>settings</var>.</p></li>

Expand Down Expand Up @@ -87444,13 +87445,8 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {

<li><p><span>Clean up after running script</span> with <var>settings</var>.</p></li>

<li>
<p>If <var>evaluationStatus</var> is a normal completion, return
<var>evaluationStatus</var>.</p>

<p class="note">This value is only ever used by the <span data-x="javascript
protocol"><code>javascript:</code> URL steps</span>.</p>
</li>
<li><p>If <var>evaluationStatus</var> is a normal completion, then return
<var>evaluationStatus</var>.</p></li>

<li><p>If we've reached this point, <var>evaluationStatus</var> was left as null because the
script was <span data-x="abort a running script">aborted prematurely</span> during evaluation.
Expand All @@ -87468,7 +87464,7 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
<li><p>Let <var>settings</var> be the <span>settings object</span> of <var>script</var>.</p></li>

<li><p><span>Check if we can run script</span> with <var>settings</var>. If this returns "do
not run" then return <span>NormalCompletion</span>(undefined).</p></li>
not run" then return <span>NormalCompletion</span>(empty).</p></li>

<li><p><span>Prepare to run script</span> given <var>settings</var>.</p></li>

Expand Down

0 comments on commit b71f885

Please sign in to comment.