MCPcopy Index your code
hub / github.com/processing/p5.js / createHTMLSelect

Function createHTMLSelect

test/unit/dom/dom.js:573–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571 });
572
573 const createHTMLSelect = options => {
574 const selectElement = document.createElement('select');
575 for (const optionName of options) {
576 const option = document.createElement('option');
577 option.setAttribute('label', optionName);
578 option.setAttribute('value', optionName);
579 selectElement.add(option);
580 }
581 return selectElement;
582 };
583
584 test('should be a function', function() {
585 assert.isFunction(mockP5Prototype.createSelect);

Callers 1

dom.jsFile · 0.85

Calls 2

setAttributeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected