1 self.addEventListener('message', function(event) {
3 .then(function(result) {
4 if (result !== undefined) {
5 event.data.port.postMessage(
6 'FAIL: claim() should be resolved with undefined');
9 event.data.port.postMessage('PASS');
11 .catch(function(error) {
12 event.data.port.postMessage('FAIL: exception: ' + error.name);