Added dynamic loading of extensions

This commit is contained in:
pythongosssss
2023-03-03 19:05:39 +00:00
parent c23af92baf
commit 592b377ac4
5 changed files with 34 additions and 13 deletions

View File

@@ -88,6 +88,15 @@ class ComfyApi extends EventTarget {
this.#createSocket();
}
/**
* Gets a list of extension urls
* @returns An array of script urls to import
*/
async getExtensions() {
const resp = await fetch("/extensions", { cache: "no-store" });
return await resp.json();
}
/**
* Loads node object definitions for the graph
* @returns The node definitions