å®é¨ç°å¢ã¯ Chrome Canary 43.0.2314.0 ã ãã©åããã¦ãåã¯ç¾æç¹ã®å®å®ç(40)ã§ãåãã¯ã ããããã㨠http://localhost:3000/api/* ã¸ã®ãªã¯ã¨ã¹ããå ¨é¨serviceworkerã«ä»»ãããã å è¡å®è£ ã¨ã㦠Jxck/response-injection ãããã ããæ¹ sw.js(ã«ãªãsw.coffee) console.log 'worker started' self.onfetch = (event) -> console.log 'onfetch', event.request.url if event.request.url.indexOf(location.origin+'/api') > -1 event.respondWith new Response '{"foo": "bar"}', status: 200
{{#tags}}- {{label}}
{{/tags}}