<?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>28199</bug_id>
          
          <creation_ts>2015-03-12 05:35:00 +0000</creation_ts>
          <short_desc>Allow source of MessageEvent to be ServiceWorker object / Client object for messaging in Service Worker</short_desc>
          <delta_ts>2015-05-06 13:33:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jungkee Song">jungkees</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>jakearchibald</cc>
    
    <cc>jsbell</cc>
    
    <cc>mike</cc>
    
    <cc>slightlyoff</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>118536</commentid>
    <comment_count>0</comment_count>
    <who name="Jungkee Song">jungkees</who>
    <bug_when>2015-03-12 05:35:00 +0000</bug_when>
    <thetext>The service worker messaging behavior (between a service worker and its client) has been sorted out (https://github.com/slightlyoff/ServiceWorker/issues/609#issuecomment-75739069) and spec&apos;ed (6dfce0aacceeef41c813c4680c7f67b96f80c4b6).

- ServiceWorker.postMessage: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-postmessage
- Client.postMessage: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#client-postmessage

For this, we&apos;d like HTML extend the event attribute of MessageEvent to be able to include ServiceWorker object and Client object.

Could you address this in the IDL definition and the source attribute definition of MessageEvent?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119097</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2015-03-30 22:58:54 +0000</bug_when>
    <thetext>Why do you want to use MessageEvent specifically rather than a new Event class?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119118</commentid>
    <comment_count>2</comment_count>
    <who name="Jungkee Song">jungkees</who>
    <bug_when>2015-03-31 02:19:39 +0000</bug_when>
    <thetext>The reason is consistency to the existing web messaging APIs. Authors would expect that they&apos;re to use the same API. Indeed, the _source_ attribute is the only property that SW wants to extend.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119193</commentid>
    <comment_count>3</comment_count>
    <who name="Jungkee Song">jungkees</who>
    <bug_when>2015-04-02 10:17:57 +0000</bug_when>
    <thetext>Hixie, FYI, we started a discussion about some more extension point: https://github.com/slightlyoff/ServiceWorker/issues/669.

So, maybe we&apos;ll need a subclass. But I&apos;m not sure what a good direction is as of now. I&apos;ll update if we make progress on that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119329</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2015-04-07 22:38:42 +0000</bug_when>
    <thetext>It&apos;s not the same API if you&apos;re using a different set of attributes...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120134</commentid>
    <comment_count>5</comment_count>
    <who name="Jungkee Song">jungkees</who>
    <bug_when>2015-05-06 13:32:00 +0000</bug_when>
    <thetext>We defined the ServiceWorkerMessageEvent(https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#serviceworkermessage-event-interface) and the ExtendableMessageEvent(https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#extendablemessage-event-interface) in service workers spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>