Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

AsyncFunction() constructor

2 tags 1 category

Warning: The arguments passed to this constructor are dynamically parsed and executed as JavaScript. APIs like this are known as injection sinks, and are potentially a vector for cross-site-scripting (XSS) attacks. You can mitigate this risk by always passing TrustedScript objects instead of strings and enforcing trusted types. See Security considerations in the Function() constructor reference for more information.

Note that AsyncFunction is not a global object. It can be obtained with the following code:

The AsyncFunction() constructor is not intended to be used directly, and all caveats mentioned in the Function() description apply to AsyncFunction().

Syntax example: new AsyncFunction(functionBody)

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…