Skip to content

Commit b71f885

Browse files
mfalkendomenic
authored andcommitted
Return empty on "do not run" for running a script
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.
1 parent 5e43bcf commit b71f885

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

source

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81986,8 +81986,9 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
8198681986
<li><p>Let <var>evaluationStatus</var> be the result of <span data-x="run a classic
8198781987
script">running the classic script</span> <var>script</var>.</p></li>
8198881988

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

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

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)