main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
349 bytes
|
Line | |
---|
1 | // @flow
|
---|
2 | import getComputedStyle from './getComputedStyle';
|
---|
3 |
|
---|
4 | export default function isScrollParent(element: HTMLElement): boolean {
|
---|
5 | // Firefox wants us to check `-x` and `-y` variations as well
|
---|
6 | const { overflow, overflowX, overflowY } = getComputedStyle(element);
|
---|
7 | return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
---|
8 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.