Skip to content

The open alternative to Salesforce, designed for AI.

455 B
Raw Blame
import { getFrontComponentExecutionContextListeners } from '@/remote/worker/environment/utils/getFrontComponentExecutionContextListeners';

export const subscribeToFrontComponentExecutionContextUpdates = (
  listener: () => void,
): (() => void) => {
  const executionContextListeners =
    getFrontComponentExecutionContextListeners();

  executionContextListeners.add(listener);

  return () => {
    executionContextListeners.delete(listener);
  };
};