| OLD | NEW |
| (Empty) |
| 1 self.onmessage = function(e) { | |
| 2 self.clients.getAll().then(function(clients) { | |
| 3 clients.forEach(function(client) { | |
| 4 if (('focus' in client) && (typeof(client.focus) == 'function')) | |
| 5 client.postMessage('focus() is present'); | |
| 6 client.focus().then(function(result) { | |
| 7 client.postMessage('focus() succeeded with ' + result); | |
| 8 client.postMessage('quit'); | |
| 9 }, function(e) { | |
| 10 client.postMessage('focus() failed with ' + e.name); | |
| 11 client.postMessage('quit'); | |
| 12 }); | |
| 13 }); | |
| 14 }); | |
| 15 } | |
| OLD | NEW |