Skip to content

Instantly share code, notes, and snippets.

@alexnodejs
Last active October 11, 2019 10:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexnodejs/5978743990ee07e0a2f1db12533f316d to your computer and use it in GitHub Desktop.
Save alexnodejs/5978743990ee07e0a2f1db12533f316d to your computer and use it in GitHub Desktop.
Find every scrollable element in the DOM (ES6 one-liner)
[...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