<?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>16304</bug_id>
          
          <creation_ts>2012-03-10 09:39:32 +0000</creation_ts>
          <short_desc>DONE != DONE</short_desc>
          <delta_ts>2013-05-16 11:44:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>XHR</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://dvcs.w3.org/hg/xhr/raw-file/8d4e9ccfdbd4/Overview.html#states</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Glenn Adams">glenn</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>hsteen</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65284</commentid>
    <comment_count>0</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-03-10 09:39:32 +0000</bug_when>
    <thetext>since DONE doesn&apos;t really mean DONE, i.e., because progress, load, and loadend are fired *after* readystatechange(DONE) is fired, it would be useful to explicitly document this curiosity by adding an informative note under the definition of DONE in section 4.6, for example:

Note: for a given request life cycle, multiple events may be fired to the request object after a readystatechange event is fired signaling transition to the DONE state; more specifically, the progress, load, loadend, and abort events may be fired while in the DONE state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66069</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-26 17:23:19 +0000</bug_when>
    <thetext>The events are dispatched in the same task that to makes the transition DONE. The whole platform works that way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66085</commentid>
    <comment_count>2</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-03-26 22:21:40 +0000</bug_when>
    <thetext>&gt;The events are dispatched in the same task that to makes the transition DONE.
&gt;The whole platform works that way.

The point is that some readers may assume &quot;DONE&quot; really means DONE. Since that isn&apos;t the case, it helps (and certainly doesn&apos;t hurt) to add a note such as suggested below.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66107</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-27 07:39:12 +0000</bug_when>
    <thetext>It&apos;s just kind of hard to grasp the confusion. Each state transition needs to be announced, which requires events. If when the events are dispatched readyState does not match the state transition (yet) that would be confusing. readystatechange/progress/load/loadend all dispatch at once more or less, it just depends on which model you are using which will be more relevant to you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75688</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-10-09 14:56:44 +0000</bug_when>
    <thetext>DONE means DONE. Events indicating the state is now DONE does not make that untrue and is in fact how every state-based API works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75754</commentid>
    <comment_count>5</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-10-09 23:44:19 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; DONE means DONE. Events indicating the state is now DONE does not make that
&gt; untrue and is in fact how every state-based API works.

I&apos;m unsatisfied with this resolution. It would do no harm to add the note I suggested in comment #1, which would satisfy my concern and allow me to close this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75813</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-10-10 10:37:40 +0000</bug_when>
    <thetext>That note is misleading. Those events will be dispatched precisely because all is DONE. readystatechange is just one of the things signaling that, don&apos;t attach too much meaning to its name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75819</commentid>
    <comment_count>7</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-10-10 11:32:21 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; That note is misleading. Those events will be dispatched precisely because
&gt; all is DONE. readystatechange is just one of the things signaling that,
&gt; don&apos;t attach too much meaning to its name.

That&apos;s just the problem. I do attach a meaning to its name. DONE. And since, there are events delivered in this state, it doesn&apos;t really seem like DONE, it seems like ALMOST_DONE. I&apos;m sure you can craft a simple note that addresses my concern and satisfies your intention. Try harder. If you don&apos;t wish to do so, I&apos;ll propose another version of the note. But it seems like it&apos;s in your court to propose a counter-proposal, and not simply reject my request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75834</commentid>
    <comment_count>8</comment_count>
    <who name="Glenn Maynard">glenn</who>
    <bug_when>2012-10-10 14:40:13 +0000</bug_when>
    <thetext>Sorry, this is just silly.  &quot;DONE&quot; means &quot;the network request is done&quot;, not &quot;this object will never do anything else&quot;.  The spec is already perfectly clear, right in the definition of DONE:

&quot;DONE (numeric value 4)  The data transfer has been completed or something went wrong during the transfer (e.g. infinite redirects).&quot; http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#states</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75908</commentid>
    <comment_count>9</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-10-11 00:18:55 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; Sorry, this is just silly.  &quot;DONE&quot; means &quot;the network request is done&quot;, not
&gt; &quot;this object will never do anything else&quot;.  The spec is already perfectly
&gt; clear, right in the definition of DONE:
&gt; 
&gt; &quot;DONE (numeric value 4)  The data transfer has been completed or something
&gt; went wrong during the transfer (e.g. infinite redirects).&quot;
&gt; http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#states

There is nothing incompatible with that definition and my suggested note. Please add the note as I requested. It is non-normative and in no way contradicts the above.

GM: please desist from making disparaging comments. It is inappropriate to do so. There is nothing &quot;silly&quot; about my reasonable request to add a note.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75911</commentid>
    <comment_count>10</comment_count>
    <who name="Glenn Maynard">glenn</who>
    <bug_when>2012-10-11 00:29:10 +0000</bug_when>
    <thetext>Adding a note that only says something that the spec already says with perfect clarity would do nothing but bloat the spec.  Notes should explain things that aren&apos;t made clear by the normative text, not merely repeat what&apos;s already clear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75913</commentid>
    <comment_count>11</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-10-11 00:32:33 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Adding a note that only says something that the spec already says with
&gt; perfect clarity would do nothing but bloat the spec.  Notes should explain
&gt; things that aren&apos;t made clear by the normative text, not merely repeat
&gt; what&apos;s already clear.

A note can say anything we want it to say. When I read the spec, I found it would be more clear if a note were present to the effect I requested. It never hurts to add a note, and &quot;spec bloat&quot; is a red herring. Stop making excuses and just add the note, and I&apos;ll close this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75914</commentid>
    <comment_count>12</comment_count>
    <who name="Glenn Maynard">glenn</who>
    <bug_when>2012-10-11 00:45:01 +0000</bug_when>
    <thetext>&quot;Disagreeing with you&quot; and &quot;making excuses&quot; are not equivalent.  As for adding a note or not, that&apos;s Anne&apos;s decision, not mine (or yours, however many times you reopen the bug).

This is no longer a productive discussion, so I&apos;m removing myself from the CC list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87754</commentid>
    <comment_count>13</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2013-05-16 10:05:54 +0000</bug_when>
    <thetext>Sort of related: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22058</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87761</commentid>
    <comment_count>14</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-16 11:44:35 +0000</bug_when>
    <thetext>http://xhr.spec.whatwg.org/#states states: &quot;The data transfer has been completed or something went wrong during the transfer (e.g. infinite redirects).&quot; There are no implications about events in particular.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>