blob: 865dc30d428228d9fc5c0161d669360f84df7660 (
plain)
1
2
3
4
5
6
7
8
9
10
|
self.addEventListener('fetch', function(event) {
var url = event.request.url;
if (url.indexOf('sample?test') == -1) {
return;
}
event.respondWith(new Promise(function(resolve) {
// null byte in blob type
resolve(new Response(new Blob([],{type: 'a\0b'})));
}));
});
|