content
content copied to clipboard
Fix output value
Summary
Expected value is true while it actually resolves to false on Chrome.
Motivation
Supporting details
Related issues
Metadata
- [ ] Adds a new document
- [ ] Rewrites (or significantly expands) a document
- [x] Fixes a typo, bug, or other error
Preview URLs
Flaws
None! 🎉
External URLs
URL: /en-US/docs/Web/API/URL_Pattern_API
Title: URL Pattern API
on GitHub
No new external URLs
Thanks much for catching this and fixing it. This change is correct but we should accompany the code snippet with a JavaScript comment explaining why. However, I’m not sure quite yet how to best to word that comment, so I’ve moved the status of this PR to Draft while I wait to hear back with some clarification from the URLPattern API spec author.
@sideshowbarker Do you know who we would consult on this?
@sideshowbarker Do you know who we would consult on this?
@wanderview This is about the following code example:
console.log(pattern.test('custom-protocol://example.com/other/path?q=1'));
…and specifically, about what we should say about the expected behavior and actual behavior for that.
Hi all, if this one is correct, do you have any objections to merging the changes and tracking the improvement example in an issue for a follow-up?
Hi all, if this one is correct, do you have any objections to merging the changes and tracking the improvement example in an issue for a follow-up?
Thanks for the bump — I’ve gone ahead and merged it. I don’t think in the case we need to keep an issue open for adding the explanatory text mentioned in my previous comments — because that would probably just result in having that issue hanging around open indefinitely (rather than this PR). For cases like this, it seems better to just land what we have and move on.
keep an issue open for adding the explanatory text would probably just result in having that issue hanging around open indefinitely (rather than this PR). For cases like this, it seems better to just land what we have and move on.
Sounds good to me, thank you! :)