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

We had a lively 1.5 hour discussion on this at TPAC.  The notes are here:

https://docs.google.com/document/d/1q090ovJ4gd8wSfVtvuoZLMZ51YkiFDsEZ0Jiqi41Iys/edit#heading=h.d6e4ecicreet

My main take aways:

 * General agreement that the service worker use cases are good.
 * Creating a primitive like URLPattern is ambitious, but there seems to be general interest and seems useful for a number of different non-sw cases.
 * We should punt on search parameters since it adds complexity and its unclear if the use case is strong enough to warrant the work.  Also, the implementation mismatch with PWA on android makes it hard to fully support.
 * Its generally ok to throw when a URLPattern uses certain features and is then passed to an API incompatible with those features; like service workers.
 * Strong consensus that a dictionary structure is more appropriate than a flat string representation.
   * If necessary this is still compatible with headers via something called "structured headers"
 * We should include multiple scopes and possibly exclude lists as part of this effort.  Excluding these approaches may drive us to support more complex patterns than necessary or result in a partially useful solution.
   * This would like like a `new URLPatternList()` that then internally has an array of `URLPattern` objects.  There would still be a single object set for the scope and used as the scope key.
   * Lots of details to figure out, though...
 * If we proceed with URLPattern as a primitive, we need to consider the long term commitment to making it useful for javascript.  What would be the forcing function to prioritize this work?
 * A good next step would be to take something like path-to-regex and list out which features we think we could or could not support.  This would let us evaluate how useful the API might be for javascript developers.

-- 
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-533408250

Received on Friday, 20 September 2019 05:12:34 UTC