-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept URL as the match algorithm's input. #218
Comments
Since URL is struct, we may need to do #217 before this? |
From a JS perspective, this works because |
Just FYI, but it was pointed out in https://github.com/w3c/ServiceWorker/pull/1701/files#r1484898361 while calling |
The original specification did not explicitly accept a URL object as an input, and expected implicit conversion from the URL object to the URLPatternInit object for matching. This change make the URL object accepted as an input explicitly. This is a step to fix whatwg#218.
I have updated the description to clarify that the match algorithm change is needed for the SW static routing API. |
In w3c/ServiceWorker#1701, the ServiceWorker static routing API uses the match algorithm to match the request URL. However, the original match algorithm accepts a URLPatternInput object, and it does not accept a URL struct. To allow the ServiceWorker static routing API to use the match algorithm, we need to make the match algorithm to accept the URL struct. Fixes: #218.
Updates in the URLPattern specification was requested during the w3c#1701 review. The issues for the request has been resolved: - whatwg/urlpattern#217 - whatwg/urlpattern#218 However, during the specification updates, the algorithm names are also updated, and adjustment is needed.
…tion (#1707) * Update link texts upon updates in the URLPattern specification Updates in the URLPattern specification was requested during the #1701 review. The issues for the request has been resolved: - whatwg/urlpattern#217 - whatwg/urlpattern#218 However, during the specification updates, the algorithm names are also updated, and adjustment is needed. Co-authored-by: Domenic Denicola <d@domenic.me>
What is the issue with the URL Pattern Standard?
In the ServiceWorker static routing API (w3c/ServiceWorker#1701), the match algorithm is used for matching with a request URL, which is a URL. However, the specification expects either of
USVString
orURLPatternInit
as its input now.To fill the gap, we may need to make the match algorithm accept URL.
The text was updated successfully, but these errors were encountered: