MCPcopy Create free account
hub / github.com/AyushSaini00/60minuteJavaScript / updateUI

Function updateUI

Random-Linear-Gradient/app.js:16–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15//Update the UI
16function updateUI(){
17 infoElem.remove();
18
19 color1Elem.innerText = getHEX();
20 color2Elem.innerText = getHEX();
21
22 color1Elem.style.background = color1Elem.innerText;
23 color2Elem.style.background = color2Elem.innerText;
24
25 codeElem.innerText = `background: linear-gradient(90deg, ${color1Elem.innerText}, ${color2Elem.innerText});`;
26 document.body.style.background = `linear-gradient(90deg, ${color1Elem.innerText}, ${color2Elem.innerText})`;
27}
28
29//when user clicks SPACE or the arrow, then UpdateUI
30

Callers 1

app.jsFile · 0.70

Calls 1

getHEXFunction · 0.85

Tested by

no test coverage detected