Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/clients-getall-worker.js

Issue 778703004: Implement ServiceWorkerClient attributes [3/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@properties-step1
Patch Set: Protect by a runtime flag Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 self.onmessage = function(e) {
2 var port = e.data.port;
3
4 self.clients.getAll().then(function(clients) {
5 var message = [];
6 clients.forEach(function(client) {
7 message.push([client.visibilityState,
8 client.focused,
9 client.url,
10 client.frameType]);
11 });
12 // Sort by url
13 message.sort(function(a, b) { return a[2] > b[2] ? 1 : -1; });
14 port.postMessage(message);
15 });
16 };
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/clients-getall.html ('k') | Source/modules/serviceworkers/ServiceWorkerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698