| OLD | NEW |
| 1 self.onfetch = function(e) { | 1 self.onfetch = function(e) { |
| 2 if (e.request.url.indexOf('clients-get-frame.html') >= 0) { | 2 if (e.request.url.indexOf('clients-get-frame.html') >= 0 || |
| 3 e.request.url.indexOf('clients-get-client-types') >= 0) { |
| 3 // On navigation, the client id should be null. | 4 // On navigation, the client id should be null. |
| 4 if (e.clientId === null) { | 5 if (e.clientId === null) { |
| 5 e.respondWith(fetch(e.request)); | 6 e.respondWith(fetch(e.request)); |
| 6 } else { | 7 } else { |
| 7 e.respondWith(Response.error()); | 8 e.respondWith(Response.error()); |
| 8 } | 9 } |
| 9 return; | 10 return; |
| 10 } | 11 } |
| 11 e.respondWith(new Response(e.clientId)); | 12 e.respondWith(new Response(e.clientId)); |
| 12 }; | 13 }; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 33 client.url, | 34 client.url, |
| 34 client.frameType]); | 35 client.frameType]); |
| 35 } else { | 36 } else { |
| 36 message.push(client); | 37 message.push(client); |
| 37 } | 38 } |
| 38 }); | 39 }); |
| 39 port.postMessage(message); | 40 port.postMessage(message); |
| 40 } | 41 } |
| 41 })); | 42 })); |
| 42 }; | 43 }; |
| OLD | NEW |