<?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>14120</bug_id>
          
          <creation_ts>2011-09-13 03:49:59 +0000</creation_ts>
          <short_desc>Current spec for EventSource close method doesn&apos;t defined behaviour when close called after &apos;onopen&apos; or &apos;onmessage&apos;. For example, Google Chrome, closes connection if &apos;close&apos; called while &apos;open&apos; event dispatching and Opera doen&apos;t close it.</short_desc>
          <delta_ts>2011-09-19 03:26:27 +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>HISTORICAL - Server-Sent Events (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#top</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>vic99999</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>56687</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-13 03:49:59 +0000</bug_when>
    <thetext>Specification: http://dev.w3.org/html5/eventsource/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:

Current spec for EventSource close method doesn&apos;t defined behaviour when close
called after &apos;onopen&apos; or &apos;onmessage&apos;.
For example, Google Chrome, closes connection if &apos;close&apos; called while &apos;open&apos;
method dispatching and Opera doen&apos;t close it.


Posted from: 90.151.254.137
User agent: Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.9.168 Version/11.51</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56689</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-09-13 05:52:48 +0000</bug_when>
    <thetext>How is it not defined?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56754</commentid>
    <comment_count>2</comment_count>
    <who name="">vic99999</who>
    <bug_when>2011-09-13 16:26:31 +0000</bug_when>
    <thetext>for example, event stream:

data: 1
data: 2
data: 3

code:

var es = new EventSource(&apos;stream&apos;);
es.addEventListener(&apos;open&apos;, function (event) {
  es.close();
}, false);

es.addEventListener(&apos;message&apos;, function (event) {
  alert(event.data);
  es.close();
}, false);

You will see different behavior for Chrome and Opera</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56964</commentid>
    <comment_count>3</comment_count>
    <who name="">vic99999</who>
    <bug_when>2011-09-19 03:26:27 +0000</bug_when>
    <thetext>&gt;&gt; The close() method must close the connection, if any; must abort any reconnection attempt, if any; and must set the readyState attribute to CLOSED. If the connection is already closed, the method must do nothing.
Sorry, didn&apos;t notice it in draft.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>