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

Method generateHTML

src/webpage/settings.ts:1118–1149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1116 this.html = html;
1117 }
1118 generateHTML(): HTMLElement {
1119 if (this.html instanceof Function) {
1120 return (this.html = this.html());
1121 } else {
1122 return this.html;
1123 }
1124 }
1125 watchForChange() {}
1126}
1127/**
1128 * This is a simple wrapper class for Options to make it happy so it can be used outside of Settings.
1129 */
1130class Float {
1131 options: Options;
1132 html: WeakRef<HTMLElement> = new WeakRef(document.createElement("div"));
1133 /**
1134 * This is a simple wrapper class for Options to make it happy so it can be used outside of Settings.
1135 */
1136 constructor(name: string, options = {ltr: false, noSubmit: true}) {
1137 this.options = new Options(name, this, options);
1138 }
1139 changed(d: HTMLElement) {
1140 const html = this.html.deref();
1141 if (!html) return;
1142 html.append(d);
1143 }
1144 generateHTML() {
1145 const html = this.options.generateHTML();
1146 this.html = new WeakRef(html);
1147 return html;
1148 }
1149}
1150class Dialog {
1151 float: Float;
1152 above = false;

Callers

nothing calls this directly

Calls 3

genAreaMethod · 0.95
addMethod · 0.80
genDataListMethod · 0.80

Tested by

no test coverage detected