how to grab window resize in eventlistener code example Example: detect resize window javascript window.addEventListener('resize', functionName);