MCPcopy Create free account
hub / github.com/MathMan05/Fermi / constructor

Method constructor

src/webpage/settings.ts:194–207  ·  view source on GitHub ↗
(
		label: string,
		onSubmit: (str: string) => void,
		owner: Options,
		{initText = "" as string | Date} = {},
	)

Source from the content-addressed store, hash-verified

192 } = {},
193 ) {
194 this.label = label;
195 this.value = initText;
196 this.owner = owner;
197 this.onSubmit = onSubmit;
198 this.onEnter = onEnter;
199 this.password = password;
200 this.spaceReplace = spaceReplace;
201 this.name = name;
202 this.charLimit = charLimit;
203 }
204 generateHTML(): HTMLDivElement {
205 const div = document.createElement("div");
206 const span = document.createElement("span");
207 span.textContent = this.label;
208 div.append(span);
209 const input = document.createElement("input");
210 if (this.name) input.name = this.name;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected