MCPcopy Create free account
hub / github.com/GoogleChrome/samples / createLabel

Function createLabel

pwa-testing/mediapicker-select-file/script.js:3–9  ·  view source on GitHub ↗
(label, id, forElement)

Source from the content-addressed store, hash-verified

1const typePrefix = "type_";
2
3function createLabel(label, id, forElement) {
4 let labelElement = document.createElement("label");
5 labelElement.id = id;
6 labelElement.textContent = label;
7 if (forElement != null) labelElement.htmlFor = forElement.id;
8 return labelElement;
9}
10
11function createImage(id, src, width) {
12 let imgElement = document.createElement("img");

Callers 2

populateCheckboxFunction · 0.85
populateCheckBoxesFunction · 0.85

Calls 1

createElementMethod · 0.80

Tested by

no test coverage detected