ohctechv3/.svn/pristine/2f/2f69c8870548ace1e658d2fad42577535713e680.svn-base

10 lines
440 B
Plaintext
Raw Normal View History

2024-10-28 15:03:36 +05:30
import getComputedStyle from "./getComputedStyle.js";
export default function isScrollParent(element) {
// Firefox wants us to check `-x` and `-y` variations as well
var _getComputedStyle = getComputedStyle(element),
overflow = _getComputedStyle.overflow,
overflowX = _getComputedStyle.overflowX,
overflowY = _getComputedStyle.overflowY;
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
}