3 self
.addEventListener('message', function(event
) {
4 event
.data
.port
.postMessage(result
);
7 self
.addEventListener('fetch', function(event
) {
8 setTimeout(function() {
10 event
.respondWith(new Response());
11 result
= 'FAIL: did not throw';
13 if (error
.name
== 'InvalidStateError')
16 result
= 'FAIL: Unexpected exception: ' + error
;