<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16801</bug_id>
          
          <creation_ts>2012-04-19 16:04:59 +0000</creation_ts>
          <short_desc>It&apos;s unclear here and elsewhere what it means to &quot;cancel the navigation&quot;, and what effects it will have e.g. on the parser (presumably it will be like getting EOF?). Could this be clarified, perhaps by rewriting in terms of the abort algorithm?</short_desc>
          <delta_ts>2012-12-01 00:46:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#dom-window-stop</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66859</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-04-19 16:04:59 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#dom-window-stop
Complete: http://www.whatwg.org/c#dom-window-stop

Comment:
It&apos;s unclear here and elsewhere what it means to &quot;cancel the navigation&quot;, and
what effects it will have e.g. on the parser (presumably it will be like
getting EOF?). Could this be clarified, perhaps by rewriting in terms of the
abort algorithm?

Posted from: 2001:4c28:a030:30:219:99ff:fe0e:5501
User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.10.282 Version/12.00</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66936</commentid>
    <comment_count>1</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2012-04-23 06:42:30 +0000</bug_when>
    <thetext>window.stop() in WebKit and Gecko and document.execCommand(&apos;Stop&apos;) in Trident abort the parser (the latter not for script-created parsers):
http://hsivonen.iki.fi/test/moz/readystate/window-stop.html
http://hsivonen.iki.fi/test/moz/readystate/document-open-window-stop.html
http://hsivonen.iki.fi/test/moz/readystate/execcommand.html
http://hsivonen.iki.fi/test/moz/readystate/document-open-execcommand.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69795</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-07-10 18:56:22 +0000</bug_when>
    <thetext>This may be clearer now that in the WHATWG copy it says both to cancel the navigation (which I think is already clearly defined to just mean aborting that &quot;navigate&quot; algorithm) _and_ abort the document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71048</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:58:59 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18291 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71512</commentid>
    <comment_count>4</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-07-26 16:08:16 +0000</bug_when>
    <thetext>It is still not clear. In particular when you cancel some other navigation e.g. step 6 of the navigate algorithm.

One interesting case is when the navigation algorithm is invoked from the load handler of the previous navigation (which is not yet mature at that point), as in http://www.hixie.ch/tests/adhoc/html/navigation/unload/same-origin/001.html 

A solution that reproduces the Gecko behaviour is to make &quot;cancel&quot; equivalent to &quot;abort&quot; without the event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71518</commentid>
    <comment_count>5</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-07-26 16:14:25 +0000</bug_when>
    <thetext>*** Bug 16800 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74052</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-18 22:55:53 +0000</bug_when>
    <thetext>I don&apos;t understand what is confusing here. Could you elaborate on some possible interpretations of &quot;cancel&quot; that are possible?

I just mean to stop running the algorithm, the same as is done in various other places in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79223</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-01 00:45:19 +0000</bug_when>
    <thetext>Ok, having carefully audited the algorithm, I think the only thing that&apos;s ambiguous is what happens if you&apos;re running the &quot;prompt to unload&quot; subalgorithm and the author does something that cancels the navigation.

I&apos;ve fixed this by killing all navigations for a doc when prompt to unload is running on that doc. This seems to be what browsers do, conveniently. I&apos;ve also explicitly said that you finish that step if the algorithm is aborted while you&apos;re on it (which can happen in some other cases), and done some other minor cleanup for the case of redirects (where the old text actually had you doing multiple beforeunload events, oops).

I&apos;m marking this FIXED, since I can&apos;t see anything else that&apos;s ambiguous here. However, I&apos;m happy to believe that I&apos;ve missed something. If you reopen this, please do include a description of two detectably different behaviours that you both think are conforming to the spec for the same situation, as a way to demonstrate the ambiguity. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79224</commentid>
    <comment_count>8</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-12-01 00:46:07 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7554.
Check-in comment: Try to clear up some ambiguities and errors in the navigation algorithm, and prevent beforeunload from ever navigating its browsing context.
http://html5.org/tools/web-apps-tracker?from=7553&amp;to=7554</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>