Edit this page

up.util up.util.microtask(task)
JavaScript function

This feature has been deprecated. Use queueMicrotask() instead.

Load unpoly-migrate.js to polyfill deprecated features.

Pushes the given function to the JavaScript microtask queue.


Parameters

task Function()

Return value

A promise that is resolved with the return value of task.

If task throws an error, the promise is rejected with that error.