You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we construct with URLPatternInit, containing an empty string pathname and the regular baseURL string, the result is a bit unintuitive. When the pathname is empty, it makes sense to me that the result is entirely inherited from the base URL, or keep it as the empty string. Also, it makes sense if the result is consistent with the case when URLPatternInit only has baseURL and doesn't have pathname field.
However, current behavior shows an inconsistent result like below.
This behavior was introduced in #107, and written in the step 17 in 3.2. URLPatternInit processing. I guess that was added to address the case when the pathname is a relative url such as *.jpg.
I wonder if we should process the step 17 if the pathname is empty, just inheriting the entire string from baseURL is intuitive, at least for me. Also, it would be nice to have the same behavior with the URL API not to surprise developers. WDYT?
What is the issue with the URL Pattern Standard?
When we construct with URLPatternInit, containing an empty string
pathname
and the regularbaseURL
string, the result is a bit unintuitive. When the pathname is empty, it makes sense to me that the result is entirely inherited from the base URL, or keep it as the empty string. Also, it makes sense if the result is consistent with the case when URLPatternInit only hasbaseURL
and doesn't havepathname
field.However, current behavior shows an inconsistent result like below.
Also, this behaves differently from the URL API.
This behavior was introduced in #107, and written in the step 17 in 3.2. URLPatternInit processing. I guess that was added to address the case when the pathname is a relative url such as
*.jpg
.I wonder if we should process the step 17 if the pathname is empty, just inheriting the entire string from baseURL is intuitive, at least for me. Also, it would be nice to have the same behavior with the URL API not to surprise developers. WDYT?
cc: @jeremyroman @domenic
The text was updated successfully, but these errors were encountered: