Glossary Term
Promise[Symbol.species]
The Promise[Symbol.species] static accessor property returns the constructor used to construct return values from promise methods.
Warning: The existence of [Symbol.species] allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are investigating whether to remove this feature. Avoid relying on it if possible.
The [Symbol.species] accessor property returns the default constructor for Promise objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:
Because of this polymorphic implementation, [Symbol.species] of derived subclasses would also return the constructor itself by default.
Syntax example: Promise[Symbol.species]
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…
