Download docs/live/scripts/api.js from sandpies/ComfyUI-Hand-Tie-Clips: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/sandpies/ComfyUI-Hand-Tie-Clips/resolve/main/docs/live/scripts/api.js
- Command line
-
hf download hf://sandpies/ComfyUI-Hand-Tie-Clips/docs/live/scripts/api.js
-
curl -L -o api.js https://huggingface.co/sandpies/ComfyUI-Hand-Tie-Clips/resolve/main/docs/live/scripts/api.js
501 Bytes
| // Demo stand-in for ComfyUI's api.js. Every request goes to the service worker. | |
| const listeners = {}; | |
| export const api = { | |
| clientId: "demo", | |
| apiURL(p) { return p; }, fileURL(p) { return p; }, | |
| addEventListener(n, f) { (listeners[n] ||= []).push(f); }, | |
| removeEventListener(n, f) { listeners[n] = (listeners[n] || []).filter((x) => x !== f); }, | |
| dispatchEvent() {}, | |
| async fetchApi(route, opts = {}) { return fetch(route.startsWith("/") ? route : "/" + route, opts); }, | |
| }; | |
| export default api; | |