Re: [w3c/ServiceWorker] scope pattern matching (#1468)

I think there might be something to say for that if URL objects were immutable. But they are not and they also stringify so it should not be a problem in practice for web developers (although making that parse once is likely more trouble than it's worth for implementers).

For me the main thing here is that given the intended use for service worker scopes, a URLPattern object does too much and there is no future where it will no longer do too much. I think that strongly argues for exposing the necessary subset directly.

Now, whether that subset needs to be wrapped in an object or not, I think I would not make people invoke a constructor first if a string suffices.

(I think @youennf's point is more that if something takes an object you kinda expect it to handle all/most flavors of that object whereas if something takes a string you expect some custom microsyntax you might have to look up.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1468#issuecomment-707835609

Received on Tuesday, 13 October 2020 15:51:01 UTC