MCPcopy Create free account
hub / github.com/philc/vimium / performStep

Method performStep

content_scripts/hud.js:246–258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

244 const alphaStep = toAlpha - fromAlpha;
245
246 const performStep = () => {
247 const elapsed = (new Date()).getTime() - startTime;
248 if (elapsed >= duration) {
249 clearInterval(this.intervalId);
250 this.updateStyle(toAlpha);
251 if (onComplete) {
252 onComplete();
253 }
254 } else {
255 const value = ((elapsed / duration) * alphaStep) + fromAlpha;
256 this.updateStyle(value);
257 }
258 };
259
260 this.updateStyle(this.opacity);
261 this.intervalId = setInterval(performStep, 50);

Callers

nothing calls this directly

Calls 1

updateStyleMethod · 0.95

Tested by

no test coverage detected