Last active
October 11, 2019 10:14
-
-
Save alexnodejs/5978743990ee07e0a2f1db12533f316d to your computer and use it in GitHub Desktop.
Find every scrollable element in the DOM (ES6 one-liner)
This file contains 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
[...document.querySelectorAll('*')].filter(el => (el && (el.scrollHeight > el.offsetHeight) && !(el.offsetWidth > el.scrollWidth))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment