Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a commented javascript example "Frontend extension" similar to custom_nodes/example_node.py.example #3603

Open
Charlweed opened this issue May 30, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation Feature A new feature to add to ComfyUI.

Comments

@Charlweed
Copy link

The example custom node custom_nodes/example_node.py.example is heavily commented, and gives a general idea on how to create a custom node. There is also a directory script_examples with examples for clients to use the API. These are very helpful.
The file example_node.py.example contains a comment block that reads:

# Set the web directory, any .js file in that directory will be loaded by the frontend as a frontend extension
# WEB_DIRECTORY = "./somejs"

But there isn't a javascript file that provides an example frontend extension, or that provides an explanation of how loaded javascript works with a custom node.

It would be great if there was a heavily commented javascript example "Frontend extension" that explains:

  • How javascript is executed by nodes
  • The general lifecycle/flow of control
  • How functions might be hooked, overloaded, or replaced
  • The use of important fields like node.imgs
@mcmonkey4eva mcmonkey4eva added documentation Improvements or additions to documentation Feature A new feature to add to ComfyUI. labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Feature A new feature to add to ComfyUI.
Projects
None yet
Development

No branches or pull requests

2 participants