Private _bindFunction to be executed within the context
Keeps the reference to current context
Private _enabledwhether the context manager is enabled or not
Calls the callback function [fn] with the provided [context]. If [context] is undefined then it will use the window. The context will be set as active
StackContextManager can track context for synchronous code (the call "stack"). It does not track context for asynchronous code (Promises, async/await).
This can be useful as a minimal ContextManager in the web/browser environment, which does not provide a native system for async context tracking. Web users might consider
@opentelemetry/context-zoneas an alternative. Node.js users will almost certainly want to useAsyncLocalStorageContextManager.