eventsource-constructor-url-bogus.js (233B)
1 onconnect = function(e) { 2 try { 3 var port = e.ports[0] 4 var source = new EventSource("http://this is invalid/") 5 port.postMessage([false, 'no exception thrown']) 6 source.close() 7 } catch(e) { 8 port.postMessage([true, e.code]) 9 } 10 }