Update frontend extension to avoid legacy ui.js import

This commit is contained in:
Peyton DeNiro
2026-03-29 14:29:27 -05:00
parent 9e7e474b05
commit d751147ed9
+17 -1
View File
@@ -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",