From d751147ed95ed5b7b59d782fd65dd6bf870b4a6b Mon Sep 17 00:00:00 2001 From: Peyton DeNiro <25550995+pydn@users.noreply.github.com> Date: Sun, 29 Mar 2026 14:29:27 -0500 Subject: [PATCH] Update frontend extension to avoid legacy ui.js import --- js/save-as-script.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/js/save-as-script.js b/js/save-as-script.js index e0db883..9de431f 100644 --- a/js/save-as-script.js +++ b/js/save-as-script.js @@ -1,6 +1,22 @@ import { api } from "../../scripts/api.js"; import { app } from "../../scripts/app.js"; -import { $el } from "../../scripts/ui.js"; + +function $el(tag, options = {}) { + const element = document.createElement(tag); + const { parent, style, ...props } = options; + + if (style) { + Object.assign(element.style, style); + } + + Object.assign(element, props); + + if (parent) { + parent.appendChild(element); + } + + return element; +} const extension = { name: "Comfy.SaveAsScript",