content
content copied to clipboard
Update Promise.try description
Description
Clarifications in the description of Promise.try.
Motivation
The current Promise.try description is quite confusing.
If Promise.try is "exactly equivalent" to the first example, then the second example should not be described as "more exact". That is confusing.
Also, if the first example is "exactly equivalent" to Promise.try, then why should it NOT be used as a polyfill? That is also confusing. Either provide reasoning or remove that statement.
Additional details
Related issues and pull requests
The current flow goes like this:
Promise.try()is equivalent to this: ...- The
try()method, in general, works like this: ... - When the
try()method is called onPromise, it happens that the first snippet and the second snippet are equivalent, because ...
Does that make sense?
Preview URLs
Flaws (1)
URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/try
Title: Promise.try()
Flaw count: 1
- bad_bcd_queries:
No BCD data for query: javascript.builtins.Promise.try
Just one suggestion and this can be merged.
https://github.com/mdn/content/pull/35783 is very similar, and should solve the problem here, so I'm closing this :) Thanks for the PR still!