MCPcopy Index your code
hub / github.com/pythongosssss/ComfyUI-Custom-Scripts / save

Method save

web/js/widgetDefaults.js:222–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

220 }
221
222 save() {
223 const rows = this.rows.children;
224 const items = [];
225
226 for (const row of rows) {
227 const inputs = row.querySelectorAll("input");
228 const node = inputs[0].value.trim();
229 const widget = inputs[1].value.trim();
230 const value = inputs[2].value;
231 if (node && widget) {
232 items.push({ node, widget, value });
233 }
234 }
235
236 setting.value = JSON.stringify(items);
237 defaults = getDefaults();
238
239 this.close();
240 }
241
242 show() {
243 this.rows.replaceChildren();

Callers 3

createButtonsMethod · 0.95
beforeRegisterNodeDefFunction · 0.80
initFunction · 0.80

Calls 2

getDefaultsFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected