WEB_DIRECTORY
from your Python module,.js
files into that directory,app.registerExtension
to register your extension.WEB_DIRECTORY
js
, and
exporting WEB_DIRECTORY
- so your __init_.py
will include something like:
.js
files.js
files will be loaded by the browser as the Comfy webpage loads. You don’t need to specify the file
your extension is in..js
files will be added to the webpage. Other resources (such as .css
files) can be accessed
at extensions/custom_node_subfolder/the_file.css
and added programmatically.
WEB_DIRECTORY
is inserted by the server.app
object, and call app.registerExtension
,
passing a dictionary that contains a unique name
,
and one or more functions to be called by hooks in the Comfy code.
A complete, trivial, and annoying, extension might look like this: