MCPcopy Create free account
hub / github.com/caseywebdev/react-list / enqueueTask

Function enqueueTask

docs/index.js:1380–1402  ·  view source on GitHub ↗
(task)

Source from the content-addressed store, hash-verified

1378 }
1379 function noop() {}
1380 function enqueueTask(task) {
1381 if (null === enqueueTaskImpl)
1382 try {
1383 var requireString = ("require" + Math.random()).slice(0, 7);
1384 enqueueTaskImpl = (module && module[requireString]).call(
1385 module,
1386 "timers"
1387 ).setImmediate;
1388 } catch (_err) {
1389 enqueueTaskImpl = function (callback) {
1390 !1 === didWarnAboutMessageChannel &&
1391 ((didWarnAboutMessageChannel = !0),
1392 "undefined" === typeof MessageChannel &&
1393 console.error(
1394 "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
1395 ));
1396 var channel = new MessageChannel();
1397 channel.port1.onmessage = callback;
1398 channel.port2.postMessage(void 0);
1399 };
1400 }
1401 return enqueueTaskImpl(task);
1402 }
1403 function aggregateErrors(errors) {
1404 return 1 < errors.length && "function" === typeof AggregateError
1405 ? new AggregateError(errors)

Callers 2

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…