<?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>11827</bug_id>
          
          <creation_ts>2011-01-21 00:00:54 +0000</creation_ts>
          <short_desc>[Workers] &quot;connect&quot; event interface type not defined</short_desc>
          <delta_ts>2011-02-02 00:43:03 +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>Web Workers (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Travis Leithead [MSFT]">travil</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <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>44527</commentid>
    <comment_count>0</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2011-01-21 00:00:54 +0000</bug_when>
    <thetext>I fully expected to see an interface ConnectEvent used to describe that APIs are available to a Shared Worker on the onconnect event handler. 

As this is implemented in Opera and Chrome and Safari today, I checked and there seems to be some disagreement in the implementations...

Both report the event name to be MessageEvent, but WebKit doesn&apos;t have a &quot;data&quot; property as expected (undefined) and Opera populates a &quot;data&quot; property with value &quot;connect&quot;.

This delta is obviously due to an under-specification of the &quot;connect&quot; event type that should be fired in this case.

Can this clarification please be added?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44529</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-01-21 00:38:45 +0000</bug_when>
    <thetext>As far as I can tell the spec is unambiguous about this. The event is called &apos;connect&apos;, it&apos;s of type &quot;MessageEvent&quot;, does not bubble, is not cancelable, has no default action, has a data attribute whose value is the empty string and has a ports attribute whose value is an array containing only the newly created port, and is fired asynchronously:

http://www.whatwg.org/specs/web-apps/current-work/complete/workers.html#shared-workers-and-the-sharedworker-interface

The MessageEvent interface additionally says that &quot;Except where otherwise specified, when the user agent creates and dispatches a message event in the algorithms described in the following sections, the lastEventId attribute must be the empty string, the origin attribute must be the empty string, the source attribute must be null, and the ports attribute must be null&quot;:

http://www.whatwg.org/specs/web-apps/current-work/complete/comms.html#messageevent

It looks like WebKit and Opera both have bugs; they should set &apos;data&apos; to the empty string.

Please reopen this bug if I&apos;m wrong. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45000</commentid>
    <comment_count>2</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2011-02-02 00:43:03 +0000</bug_when>
    <thetext>yes, it looks like I just missed the portion of the spec describing the connect event&apos;s type and related info.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>