rust-urlpattern icon indicating copy to clipboard operation
rust-urlpattern copied to clipboard

Fix `URLPatternResult#inputs` behaviour

Open lucacasonato opened this issue 4 years ago • 1 comments

There is an inconsistency between spec and tests and Chromium. Needs a spec decision https://github.com/WICG/urlpattern/issues/133.

lucacasonato avatar Sep 07 '21 19:09 lucacasonato

Hi,

the protocol property inside the inputs array of a url pattern result includes the colon : after http but in the other protocol property the colon is omitted. Using deno's latest version. Is this a bug? Thanks!

{
  inputs: [
    {
      protocol: "http:",
      username: "",
      password: "",
      hostname: "localhost",
      port: "8080",
      pathname: "/",
      search: "",
      hash: ""
    }
  ],
  protocol: { input: "http", groups: { "0": "http" } },
  username: { input: "", groups: { "0": "" } },
  password: { input: "", groups: { "0": "" } },
  hostname: { input: "localhost", groups: { "0": "localhost" } },
  port: { input: "8080", groups: { "0": "8080" } },
  pathname: { input: "/", groups: {} },
  search: { input: "", groups: { "0": "" } },
  hash: { input: "", groups: { "0": "" } }
}

timonson avatar Jun 25 '22 23:06 timonson