MCPcopy Create free account
hub / github.com/JKPotato-Computer/SignMaker / appendOption

Function appendOption

js/lib.js:20–29  ·  view source on GitHub ↗
(selectElmt, value, {selected = false, text} = {})

Source from the content-addressed store, hash-verified

18 * @param {string} [text] - Display text for the option.
19 */
20 const appendOption = function(selectElmt, value, {selected = false, text} = {}) {
21 if (!text) {
22 text = value;
23 }
24 const optionElmt = document.createElement("option");
25 optionElmt.value = value;
26 optionElmt.selected = selected;
27 optionElmt.appendChild(document.createTextNode(text));
28 selectElmt.appendChild(optionElmt);
29 };
30
31 // FHW-defined colors.
32 const colors = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected