MCPcopy
hub / github.com/mattboldt/typed.js / toggleBlinking

Method toggleBlinking

src/typed.js:386–397  ·  view source on GitHub ↗

* Toggle the blinking cursor * @param {boolean} isBlinking * @private

(isBlinking)

Source from the content-addressed store, hash-verified

384 * @private
385 */
386 toggleBlinking(isBlinking) {
387 if (!this.cursor) return;
388 // if in paused state, don't toggle blinking a 2nd time
389 if (this.pause.status) return;
390 if (this.cursorBlinking === isBlinking) return;
391 this.cursorBlinking = isBlinking;
392 if (isBlinking) {
393 this.cursor.classList.add('typed-cursor--blink');
394 } else {
395 this.cursor.classList.remove('typed-cursor--blink');
396 }
397 }
398
399 /**
400 * Speed in MS to type

Callers 5

stopMethod · 0.95
typewriteMethod · 0.95
keepTypingMethod · 0.95
doneTypingMethod · 0.95
backspaceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected