Replies: 3 comments 7 replies
-
|
Not sure I fully understand, but there is the |
Beta Was this translation helpful? Give feedback.
-
|
Assuming you are taking a string as an input (and not, e.g., a JS object or equivalent), I think there are two paths:
The latter feels better to me, personally. It is the direction we've steered for service worker static routes, which were originally more like the former. The latter is also the only natural way to let you have patterns that include any search matches, I think. Although URLPattern isn't great for search matching (see #150), it still seems like something like On the other hand, @wanderview seemed to be advocating for something more like the former in #20, and apparently that stemmed from a suggestion by @annevk. |
Beta Was this translation helpful? Give feedback.
-
|
I opened a slightly more-general issue here: #182 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We're working on the compression dictionary spec which has a need for URL pattern matching but only the
pathnameandsearchare configurable since the patters enforces same-origin requirements.Is there a way to provide relative paths to a given URL on the object constructor or is it cleaner to just use the
URLPattern(pattern, baseURL)format, specify that thebaseUrlwill be the URL of the request andpatterncan then be relative or absolute and we just enforce the same-origin requirements out-of-band?Beta Was this translation helpful? Give feedback.
All reactions