Re: [ServiceWorker] Clients & postMessage (#609)

@jakearchibald 
>serviceWorkerInstance.postMessage lands at self.onmessage within the ServiceWorker. The >messageEvent.source will be an instance of WindowClient or Client depending on the sender

What about the case when the sender is not controlled by the service worker? Should the source still be an instance of WindowClient/Client?
For example:
```javascript
navigator.serviceWorker.register({some options}).then(function(registration) {
    registration.active.postMessage();
});
```
Assuming the registration has an active worker, the registering window can post messages to the worker without being controlled by it.


---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/609#issuecomment-75883456

Received on Wednesday, 25 February 2015 00:46:47 UTC