mdn / mdn/browser-compat-data

javascript.{statements.for_await_of,builtins.Array.fromAsync} - data for closing sync iterables

Open
#27,729 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

browser:multiple data:js needs collector test p3
Dominant language
JSON
Stars
5.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
186

Description

What type of issue is this?

Missing compatibility data

What information was incorrect, unhelpful, or incomplete?

See https://github.com/mdn/content/issues/37038: in https://github.com/tc39/ecma262/pull/2600, the behavior of the following code has changed:

function* generatorWithRejectedPromises() {
  try {
    yield 0;
    yield 1;
    yield Promise.resolve(2);
    yield Promise.reject(new Error("failed"));
    yield 4;
    throw new Error("throws");
  } finally {
    console.log("called finally");
  }
}

(async () => {
  try {
    for await (const num of generatorWithRejectedPromises()) {
      console.log(num);
    }
  } catch (e) {
    console.log("caught", e);
  }
})();

After the PR, we now log called finally. This affects at least for await...of and Array.fromAsync.

What browsers does this problem apply to, if applicable?

No response

What did you expect to see?

Data for when this became supported. Chrome supported this quite early, and latest Firefox supports this as well.

Did you test this? If so, how?

Running the above code.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

No response

Do you have anything more you want to share?

No response

MDN URL

No response

MDN metadata

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the compatibility records for javascript.statements.for_await_of and javascript.builtins.Array.fromAsync, then compare browser support data with the behavior described in tc39/ecma262#2600 and the linked MDN issue. Done means the records include accurate support versions for closing synchronous iterables and the data passes the repository’s validation checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.