mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 21:42:37 +08:00
Helper method
This commit is contained in:
parent
34c7e5f45e
commit
d32a38584c
9
web/extensions/core/uiOutput.js
Normal file
9
web/extensions/core/uiOutput.js
Normal file
@ -0,0 +1,9 @@
|
||||
export function registerUiOutputListener(nodeType, nodeData, message_type, func) {
|
||||
if (nodeData?.ui_output?.includes(message_type)) {
|
||||
const onExecuted = nodeType.prototype.onExecuted;
|
||||
nodeType.prototype.onExecuted = function (message) {
|
||||
onExecuted?.apply(this, arguments);
|
||||
if (message[message_type]) func.apply(this, [message[message_type]]);
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user