Ben Kelly

Results 228 comments of Ben Kelly

> I am happy to put in the spec work for this. We just need to figure out if we want to spec a "fast" tree based implementation of URLPatternList,...

Info on service worker scope ordering can be found in the [explainer](https://github.com/WICG/urlpattern/blob/main/explainer.md#scope-match-ordering) and [design doc](https://docs.google.com/document/d/17L6b3zlTHtyxQvOAvbK55gQOi5rrJLERwjt_sKXpzqc/edit#heading=h.soq07i5s0voz).

If we expose an ordering here @domenic suggests the best way to do that would be an `URLPattern.compare()` static function.

I think I have something that will work. I hope to have it in chrome canary this week for folks to try out.

I have a prototype written and in review. It implements `URLPattern.compare()` static method that determines which pattern is "more specific". Here determining specificity means comparing a number of things. First...

I forgot to mention, `URLPattern.compare(left, right)` will return `1` if `left` is more specific, `-1` if `right` is more specific, and `0` if they are considered equal. This means if...

I'm happy to change the name if folks think that is appropriate. I originally conceived of the "more specific" algorithm for service worker scope processing. We need something like this...

I guess I had thought protocol was more specific than others because it determines how other components work, etc. For example, it changes how pathname parses. I'm happy to reverse...

Thinking about it, I see the point now how things are more specific on the right of the URL. I'll reverse the component ordering in the prototype.

A couple more thoughts I had while cutting the grass this evening: First, maybe its not accurate to say the proposal is comparing which is "more specific". After all, `/reallylong`...