Steps to reproduce:
(1) Open a tab and navigate to any URL;
(2) Run the following code in the Console of Devtools:
(3) Then this code would throw a SyntaxError exception.
This code would throw a SyntaxError exception: `SyntaxError: The string did not match the expected pattern.`
As https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource says, when the URL param is an empty string, it should be parsed as a relative URL to the API's URL.
In fact, Firefox works as the spec says, and Chrome has fixed this problem following the spec nowadays too.
Created attachment 430597 [details]
Seems like an easy enough fix. Let's see if we already have tests that cover this.
Comment on attachment 430597 [details]
Created attachment 430626 [details]
Looks like Yusuke already reviews, so don’t really need my review too, but I saw a review?