MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / isContentOverflowing

Function isContentOverflowing

scripts/smoothScroll.js:663–667  ·  view source on GitHub ↗
(el, x)

Source from the content-addressed store, hash-verified

661 } while ((el = el.parentElement));
662 }
663 function isContentOverflowing(el, x) {
664 return x
665 ? el.clientWidth + 10 < el.scrollWidth
666 : el.clientHeight + 10 < el.scrollHeight;
667 }
668 function computedOverflow(el, x) {
669 let property = x ? "overflow-x" : "overflow-y";
670 return getComputedStyle(el, "").getPropertyValue(property);

Callers 1

overflowingAncestorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected