<?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>13525</bug_id>
          
          <creation_ts>2011-08-02 18:51:34 +0000</creation_ts>
          <short_desc>Define what .origin should be for message events</short_desc>
          <delta_ts>2011-08-08 21:43:36 +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>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></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="Jonas Sicking (Not reading bugmail)">jonas</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mcmanus</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>52002</commentid>
    <comment_count>0</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-08-02 18:51:34 +0000</bug_when>
    <thetext>Right now the websocket protocol doesn&apos;t say what event.origin should return for message events fired for incoming data, which I believe implicitly means that it should be the empty string.

It seems nice if it was more consistent with EventSource which uses the origin of the server we&apos;re connected to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52014</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-08-02 22:01:35 +0000</bug_when>
    <thetext>Oops, wrong component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54401</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-08 21:16:39 +0000</bug_when>
    <thetext>http://www.whatwg.org/specs/web-apps/current-work/complete.html#messageevent defines the default as being the empty string, yes.

What origin would you want it set to? Web Sockets by definition are same-origin with whatever script created them (they don&apos;t connect successfully otherwise). I suppose we could parse WebSocket.url and set MessageEvent.origin to the scheme, host, and port parts of that URL, but that seems a bit awkward (and wouldn&apos;t really be an origin in the technical sense).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54403</commentid>
    <comment_count>3</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-08-08 21:24:11 +0000</bug_when>
    <thetext>Why wouldn&apos;t that be a origin in the technical sense?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54407</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-08 21:41:12 +0000</bug_when>
    <thetext>We talked about this on IRC. I&apos;ll do what EventSource does (it also doesn&apos;t use what is technically the origin, but this is mostly a matter of how you view things and if it&apos;ll help authors, why not expose it).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54408</commentid>
    <comment_count>5</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-08-08 21:43:36 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6386.
Check-in comment: Make event.origin for WebSockets work like it does for EventSource, for consistency.
http://html5.org/tools/web-apps-tracker?from=6385&amp;to=6386</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>