The result of the test() method of the URLPattern interface in the Chromium implementation does not match the result of this polyfill.
import {URLPattern as URLPatternPolyfill} from "urlpattern-polyfill";
const myPathName = "/some-test/index.html";
const url1 = new URLPattern({ pathname: myPathName });
const url2 = new URLPatternPolyfill({ pathname: myPathName });
const testPathName = "/some-test/index.html#test";
console.log("Chromium:", url1.test({pathname: testPathName}));
console.log("Polyfill:", url2.test({pathname: testPathName}));
Result:
Chromium: false
Polyfill: true
This issue brakes the possibility of using hash-based routing in the Lit-Router (issue lit/lit#3517).
The result of the test() method of the URLPattern interface in the Chromium implementation does not match the result of this polyfill.
Result:
This issue brakes the possibility of using hash-based routing in the Lit-Router (issue lit/lit#3517).