← Back to release summary

queueMicrotask

Category
Miscellaneous
Type
New or changed feature
Status
Enabled by default (Chrome 71)
Intent stage
None

Summary

Adds a new method, queueMicrotask() that allows direct queueing of a callback to run as a microtask. Microtasks are callbacks that run just before the current task ends. Current examples are callbacks for promises that resolve immediately. This method is available on the window and worker objects. See the explainer: https://github.com/fergald/docs/blob/master/explainers/queueMicrotask.md

Standards & signals

Docs: https://github.com/whatwg/html/issues/512 https://github.com/fergald/docs/blob/master/explainers/queueMicrotask.md

View on chromestatus.com