Skip to content

Commit 0598711

Browse files
committed
Add an extended attribute to allow propagating TC39's AsyncContext
This PR updates WebIDL to add the `[PropagatesAsyncContext]` extended attribute. This is a part of the TC39 AsyncContext proposal, which allows storing state associated with an async flow of execution in JavaScript, and preserving it across different kinds of async continuations in both JS and the web platform. This `[PropagatesAsyncContext]` extended attribute can only be applied to callback function types in operation arguments. When set, the callback context will also store an Async Context Mapping, which the callback will run in. This allows a callback-taking operation to act like an async continuation, and propagate the state associated with the async flow of execution at the time that this operation is called to the callback. This patch relies on HTML's PR whatwg/html#12152 to define the "run with Async Context Mapping" operation. This operation must be defined in a web specs rather than in the TC39 proposal because it deals with throwing in spec algorithms, which is not a concept in the TC39 specs.
1 parent b1bba60 commit 0598711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14876,7 +14876,7 @@ a return type that is a [=promise type=].
1487614876

1487714877
<div algorithm>
1487814878

14879-
To <dfn id="construct-a-callback-function" export>construct</dfn> a
14879+
To <dfn id="construct-a-callback-function" export>construct</dfn> aq
1488014880
[=callback function type=] value |callable| with a [=Web IDL arguments list=] |args|,
1488114881
perform the following steps.
1488214882
These steps will either return an IDL value or throw an exception.

0 commit comments

Comments
 (0)