ComfyBox icon indicating copy to clipboard operation
ComfyBox copied to clipboard

Global event bus

Open space-nuko opened this issue 2 years ago • 0 comments

Some events already work in a "global" fashion like the default queue prompt button and the beforeQueued/afterQueued event. So it makes sense to have users create their own global events that are forwarded throughout the graph.

I wonder how this would work however. There would be some global state with a dict of Record<EventName, LGraphNode[]> somewhere I think. When onAction is called each node on the bus is triggered in sequence.

space-nuko avatar May 20 '23 14:05 space-nuko