a deferred pattern where you provide an original callback but then can change the value returned (if the promise is still pending)...
No-Library (pure JS), HTML, CSS, JavaScript
No-Library (pure JS), HTML, CSS, TypeScript
passing execution from one to the other