MCPcopy Index your code
hub / github.com/reactive-python/reactpy / fadeOutElementThenCallback

Function fadeOutElementThenCallback

docs/source/_custom_js/src/index.js:57–75  ·  view source on GitHub ↗
(element, callback)

Source from the content-addressed store, hash-verified

55 );
56
57 function fadeOutElementThenCallback(element, callback) {
58 {
59 var op = 1; // initial opacity
60 var timer = setInterval(function () {
61 {
62 if (op < 0.001) {
63 {
64 clearInterval(timer);
65 element.style.display = "none";
66 callback();
67 }
68 }
69 element.style.opacity = op;
70 element.style.filter = "alpha(opacity=" + op * 100 + ")";
71 op -= op * 0.5;
72 }
73 }, 50);
74 }
75 }
76
77 mountEl.appendChild(enableWidgetButton);
78}

Callers 1

activateViewFunction · 0.85

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected