Files
vectorcraft/docs
dotCooCoo ab12c44ebd JavaScript: .js scripts run async functions and await
A .js script now reads async function declarations and expressions, async
arrow functions and async methods in object literals, as ECMA-262 2017
section 25.5 defines them. A call returns a Promise that the function's
return resolves and an uncaught exception rejects. await suspends the
function's frame until its operand settles; a promise job resumes it with
the value, or throws the rejection at the await, so try, catch and finally
work around it.

- Options::es2017 turns the syntax on and implies Options::es2015;
  script.run sets it for .js files. .jsx scripts and source strings keep
  async and await as plain names.
- A suspended frame is a heap object the collector traces, reached only
  from its promise reactions, so a function waiting on a promise that
  nothing can settle is freed. Each resume is a job and takes fuel.
- AsyncFunction and its prototype exist without a global binding; async
  functions are not constructors and have no prototype property.
- The test262 runner reads the async-function, await and async-arrow
  folders and counts runs with and without the option; an async test with
  a runtime negative now has to throw.
2026-11-22 08:59:26 -08:00
..
2026-11-20 05:45:14 +07:00
2026-11-19 15:12:20 +07:00