Tested on IE11 and Edge.
The origin property on received MessageEvent is undefined.
I think it's due to the use of eventsource.url (instead of eventsource.URL) when creating the MessageEvent.
To go even further I would maybe use window.location.origin instead of eventsource.URL as we may want the protocol://host part of the url instead?