* Toggle the blinking cursor * @param {boolean} isBlinking * @private
(isBlinking)
| 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 |
no outgoing calls
no test coverage detected