Last active
September 28, 2019 08:20
-
-
Save kettanaito/bbfe7bd91f6cf008b272d11faa8dac9d to your computer and use it in GitHub Desktop.
Throttle/Debounce Article
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
// Adding this event listener prints the message | |
// into browser's console whenever the window | |
// is resized (emits the "resize" event). | |
// | |
// Note that the "resize" event occurs for each | |
// pixel that the browser being resized. | |
window.addEventListener('resize', function () { | |
console.log('Resize happened!') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment