content icon indicating copy to clipboard operation
content copied to clipboard

Fix output value

Open motiejunas opened this issue 3 years ago • 4 comments

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

motiejunas avatar Feb 19 '22 18:02 motiejunas

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

github-actions[bot] avatar Feb 20 '22 01:02 github-actions[bot]

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 avatar Feb 20 '22 02:02 sideshowbarker

@sideshowbarker Do you know who we would consult on this?

Josh-Cena avatar Aug 09 '22 06:08 Josh-Cena

@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.

sideshowbarker avatar Aug 10 '22 02:08 sideshowbarker

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?

bsmth avatar Sep 22 '22 14:09 bsmth

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.

sideshowbarker avatar Sep 22 '22 21:09 sideshowbarker

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! :)

bsmth avatar Sep 23 '22 07:09 bsmth