1 self
.addEventListener('fetch', function(event
) {
2 var testcase
= new URL(event
.request
.url
).search
;
4 case '?response-object':
5 event
.respondWith(new Response('body'));
7 case '?response-promise-object':
8 event
.respondWith(Promise
.resolve(new Response('body')));
11 event
.respondWith(new Object());