MCPcopy Create free account
hub / github.com/docker/getting-started / microtaskDebounce

Function microtaskDebounce

app/src/static/js/react-bootstrap.js:3016–3029  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

3014}
3015
3016function microtaskDebounce(fn) {
3017 var called = false;
3018 return function () {
3019 if (called) {
3020 return;
3021 }
3022
3023 called = true;
3024 window.Promise.resolve().then(function () {
3025 called = false;
3026 fn();
3027 });
3028 };
3029}
3030
3031function taskDebounce(fn) {
3032 var scheduled = false;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…