Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 self.addEventListener('fetch', event => { | |
| 2 if (event.request.url.indexOf('?post-with-blob-body') == -1) | |
| 3 return; | |
| 4 event.respondWith( | |
| 5 event.request.text().then(resp => { | |
| 6 if (resp.indexOf("it's me the blob") == -1) | |
|
horo
2016/05/12 06:13:36
Nit: use single quotes
falken
2016/05/12 08:49:33
Done.
| |
| 7 return new Response('fail'); | |
| 8 if (resp.indexOf("and more blob!") == -1) | |
|
horo
2016/05/12 06:13:36
Nit: use single quotes
falken
2016/05/12 08:49:33
Done.
| |
| 9 return new Response('fail'); | |
| 10 return new Response('Pass'); | |
| 11 })); | |
| 12 }); | |
| OLD | NEW |