| OLD | NEW |
| 1 self.onmessage = function(e) { | 1 self.onmessage = function(e) { |
| 2 var port = e.data.port; | 2 var port = e.data.port; |
| 3 var options = e.data.options; | 3 var options = e.data.options; |
| 4 | 4 |
| 5 self.clients.matchAll(options).then(function(clients) { | 5 e.waitUntil(self.clients.matchAll(options).then(function(clients) { |
| 6 var message = []; | 6 var message = []; |
| 7 clients.forEach(function(client) { | 7 clients.forEach(function(client) { |
| 8 message.push([client.visibilityState, | 8 message.push([client.visibilityState, |
| 9 client.focused, | 9 client.focused, |
| 10 client.url, | 10 client.url, |
| 11 client.frameType]); | 11 client.frameType]); |
| 12 }); | 12 }); |
| 13 port.postMessage(message); | 13 port.postMessage(message); |
| 14 }); | 14 })); |
| 15 }; | 15 }; |
| OLD | NEW |