We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 577fe08 commit 513b2aeCopy full SHA for 513b2ae
src/util/env.js
@@ -18,7 +18,15 @@ var inBrowser = exports.inBrowser =
18
toString.call(window) !== '[object Object]'
19
20
/**
21
- * Defer a task to the start of the next event loop
+ * Defer a task to execute it asynchronously. Ideally this
22
+ * should be executed as a microtask, so we leverage
23
+ * MutationObserver if it's available.
24
+ *
25
+ * If the user has included a setImmediate polyfill, we can
26
+ * also use that. In Node we actually prefer setImmediate to
27
+ * process.nextTick so we don't block the I/O.
28
29
+ * Finally, fallback to setTimeout(0) if nothing else works.
30
*
31
* @param {Function} cb
32
* @param {Object} ctx
0 commit comments