From 8667b1605b11954e5b985e1ee719b4bca7a1d643 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Mon, 25 Mar 2024 15:22:07 +1100 Subject: [PATCH] Use build a URL pattern instead of hand-creating a dictionary. --- index.html | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 416ac65..dc0a5a4 100644 --- a/index.html +++ b/index.html @@ -533,15 +533,10 @@

  • For each |entry:URLPatternInit| of |json|["scope_patterns"]:
      -
    1. If |entry| is not a {{URLPatternInput}}, continue. -
    2. -
    3. If |entry| is a {{URLPatternInit}}, set |entry|["baseURL"] - to |manifest URL|, and let |base URL| be null. Otherwise, let - |base URL| be |manifest URL|. -
    4. -
    5. Let |pattern:URL pattern| be the result of [=URL - pattern/create|creating=] a [=URL pattern=] given |entry| and - |base URL|. If this process throws, continue. +
    6. Let |pattern:URL pattern| be the result of [=build a URL + pattern from an infra value|building a URL pattern from an + infra value=] |entry| given |manifest URL|. If this process + throws or returns null, continue.
    7. Append |pattern| to |processed scope patterns|.