blob: 17913063583a8276675adcc65a66e843d83a303f (
plain)
1
2
3
4
5
6
7
8
9
10
|
self.onmessage = function(e) {
e.waitUntil(self.clients.matchAll().then(function(clients) {
clients.forEach(function(client) {
client.postMessage('Sending message via clients');
if (!Array.isArray(clients))
client.postMessage('clients is not an array');
client.postMessage('quit');
});
}));
};
|