MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / addShadow

Function addShadow

assets/js/gradient-showcase.js:139–153  ·  view source on GitHub ↗
(gradient)

Source from the content-addressed store, hash-verified

137
138const ul = document.querySelector("ul");
139async function addShadow(gradient) {
140 const li = document.createElement("li");
141
142 li.style.background = gradient.background;
143 li.innerHTML = `<h2>${gradient.inner}</h2><br>
144 <p>${gradient.background}</p>`;
145 li.addEventListener("mouseenter", function () {
146 document.body.style.background = gradient.background;
147 });
148 li.addEventListener("onmouseout", function () {
149 document.body.style.background = "transparent";
150 });
151
152 ul.appendChild(li);
153}
154
155async function processArray(array) {
156 for (const item of gradients) {

Callers 1

processArrayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected