chromium/third_party/blink/web_tests/external/wpt/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.js

try {
  var url = decodeURIComponent(location.hash.substr(1))
  var source = new EventSource(url)
  source.onerror = function(e) {
    postMessage([true, this.readyState, 'data' in e])
    this.close();
  }
} catch(e) {
  postMessage([false, String(e)])
}