MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

static/settings.ts:118–125  ·  view source on GitHub ↗
(elem: JQuery, name: string, populate: {label: string; desc: string}[])

Source from the content-addressed store, hash-verified

116
117class Select extends BaseSetting {
118 constructor(elem: JQuery, name: string, populate: {label: string; desc: string}[]) {
119 super(elem, name);
120
121 elem.empty();
122 for (const e of populate) {
123 elem.append($(`<option value="${e.label}">${e.desc}</option>`));
124 }
125 }
126
127 override putUi(value: string | number | boolean | null) {
128 this.elem.val(value?.toString() ?? '');

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected