Skip to content
New issue

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

Content bug: inconsistent/incomplete descriptions of Promises as parameters #9362

Closed
foolip opened this issue Sep 30, 2021 · 0 comments · Fixed by #34277
Closed

Content bug: inconsistent/incomplete descriptions of Promises as parameters #9362

foolip opened this issue Sep 30, 2021 · 0 comments · Fixed by #34277
Labels
Content:WebAPI Web API docs

Comments

@foolip
Copy link
Contributor

foolip commented Sep 30, 2021

What page(s) did you find the problem on?

Compare the descriptions of parameters here:
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/show
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestUpdateEvent/updateWith

What is the problem?

PaymentRequest's show() method is documented as taking a promise, while PaymentRequestUpdateEvent's updateWith() method is documented as taking an object. Actually, the two both accept the same kind of parameter, and because of the way that promises work, one can pass either an object directly or a promise that resolves to an object.

What did you expect to see?

A consistent style that makes it clear what can be used as the argument.

Promises as parameters is not very common on the web platform, but there are other cases that also have a mix of styles:

@foolip foolip added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Sep 30, 2021
@sideshowbarker sideshowbarker added Content:WebAPI Web API docs and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants