MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / testScrollable

Function testScrollable

src/components/sidebar/index.js:723–734  ·  view source on GitHub ↗

* Test if the element is scrollable recursively * @param {HTMLElement} container * @returns

(container)

Source from the content-addressed store, hash-verified

721 * @returns
722 */
723 function testScrollable(container) {
724 if (!container || container === lastEl) return false;
725
726 const { scrollHeight, offsetHeight, scrollWidth, offsetWidth } = container;
727
728 if (scrollHeight > offsetHeight) return true;
729 if (scrollWidth > offsetWidth) return true;
730
731 lastEl = container;
732
733 return testScrollable(container.parentElement.closest(".scroll"));
734 }
735});
736
737preventSlideTests.push((target) => {

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected