MCPcopy Create free account
hub / github.com/EsperoTech/yaade / browserQueueMicrotaskImpl

Function browserQueueMicrotaskImpl

server/src/main/resources/jasmine.js:2810–2823  ·  view source on GitHub ↗
(global)

Source from the content-addressed store, hash-verified

2808 const maxInlineCallCount = 10;
2809
2810 function browserQueueMicrotaskImpl(global) {
2811 const { setTimeout, queueMicrotask } = global;
2812 let currentCallCount = 0;
2813 return function clearStack(fn) {
2814 currentCallCount++;
2815
2816 if (currentCallCount < maxInlineCallCount) {
2817 queueMicrotask(fn);
2818 } else {
2819 currentCallCount = 0;
2820 setTimeout(fn);
2821 }
2822 };
2823 }
2824
2825 function nodeQueueMicrotaskImpl(global) {
2826 const { queueMicrotask } = global;

Callers

nothing calls this directly

Calls 1

setTimeoutFunction · 0.70

Tested by

no test coverage detected