We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to use the URLPattern API for testing a given URL against a URL pattern but I'm getting unexpected behaviour compared to Chrome.
URL: https://www.youtube.com/watch?v=Yw6u6YkTgQ4 Pattern: https://*.youtube.com/watch*
https://www.youtube.com/watch?v=Yw6u6YkTgQ4
https://*.youtube.com/watch*
Worker:
const pattern = new URLPattern('https://*.youtube.com/watch*'); console.log(pattern); URLPattern { protocol: 'https', username: '', password: '', hostname: '*.youtube.com', port: '', pathname: '/watch*', search: '', hash: '' } pattern.test('https://www.youtube.com/watch?v=Yw6u6YkTgQ4'); false pattern.exec('https://www.youtube.com/watch?v=Yw6u6YkTgQ4'); null
Chrome:
const pattern = new URLPattern('https://*.youtube.com/watch*'); console.log(pattern); URLPattern { hasRegExpGroups: false, hash: "*", hostname: "*.youtube.com", password: "*", pathname: "/watch*", port: "", protocol: "https", search: "*", username: "*", } pattern.test('https://www.youtube.com/watch?v=Yw6u6YkTgQ4'); true
The text was updated successfully, but these errors were encountered:
Thanks for the bug report. This will be fixed with #3529
Sorry, something went wrong.
anonrig
No branches or pull requests
I'm trying to use the URLPattern API for testing a given URL against a URL pattern but I'm getting unexpected behaviour compared to Chrome.
URL:
https://www.youtube.com/watch?v=Yw6u6YkTgQ4
Pattern:
https://*.youtube.com/watch*
Worker:
Chrome:
The text was updated successfully, but these errors were encountered: