Last active
June 11, 2020 08:55
-
-
Save CodHeK/98203b1444ad05167c77379fc6deaed5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const $input = document.getElementById('input'); | |
let INPUT_DEBOUNCE = null; | |
$input.addEventListener('input', e => { | |
clearTimeout(INPUT_DEBOUNCE); | |
$span.textContent = ''; // let's come to this on a later stage, for now pretend it doesn't exist | |
INPUT_DEBOUNCE = setTimeout(() => main(e), 250); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment