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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/client-id-worker.js

Issue 1209493002: Service Worker: Surface Client.id attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a reference to RFC4122. Created 5 years, 6 months 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 var message = [];
4
5 // 1st matchAll()
6 self.clients.matchAll()
7 .then(function(clients) {
8 clients.forEach(function(client) {
9 message.push(client.id);
10 });
11 })
12 .then(function() {
falken 2015/06/25 04:09:56 why is this a new function, it looks like the prev
jungkees 2015/06/25 07:48:37 The first forEach implicitly returns undefined, bu
13 // 2nd matchAll()
14 return self.clients.matchAll().then(function(clients) {
15 clients.forEach(function(client) {
16 message.push(client.id);
17 });
18 });
19 })
20 .then(function() {
21 // Send an array containing ids of clients from 1st and 2nd matchAll()
22 port.postMessage(message);
23 });
24 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698