<?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>14057</bug_id>
          
          <creation_ts>2011-09-07 06:29:34 +0000</creation_ts>
          <short_desc>In section &quot;The WebSocket interface&quot; when describing the operation of the WebSocket constructor, the following statement is made: &quot;Return a new WebSocket object, and continue these steps in the background (without blocking scripts). ... Establish a WebSoc</short_desc>
          <delta_ts>2011-09-10 05:23:04 +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>WebSocket API (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>chuck</cc>
    
    <cc>ian</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>56457</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-07 06:29:34 +0000</bug_when>
    <thetext>Specification: http://dev.w3.org/html5/websockets/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
In section &quot;The WebSocket interface&quot; when describing the operation of the
WebSocket constructor, the following statement is made:

&quot;Return a new WebSocket object, and continue these steps in the background
(without blocking scripts). ... Establish a WebSocket connection given the set
(host, port, resource name, secure), ...&quot;

This is problematic because it means that the WebSocket connection can be
successfuly established before the script has a chance to set the onopen
property. This can result in missed onopen events.

Instead the operation of the WebSocket constructor should be suspended until
the currently executing script block is finished.

Dan Shappir
Ericom Software

Posted from: 81.218.35.98
User agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56473</commentid>
    <comment_count>1</comment_count>
    <who name="Charles Pritchard">chuck</who>
    <bug_when>2011-09-07 16:22:47 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Specification: http://dev.w3.org/html5/websockets/
&gt; This is problematic because it means that the WebSocket connection can be
&gt; successfuly established before the script has a chance to set the onopen
&gt; property. This can result in missed onopen events.

As I understand things, even if the websocket establishes before the end of the event loop, the onopen event will not be processed until the next loop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56598</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-10 05:23:04 +0000</bug_when>
    <thetext>comment 1 is correct.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>