(current: Element)
| 281 | } |
| 282 | |
| 283 | function getOverflowStyles(current: Element): OverflowStyles { |
| 284 | var overflowElem = current; |
| 285 | if (htmlOverflowStyle === 'visible') { |
| 286 | if (current === htmlElem && bodyElem) { |
| 287 | overflowElem = bodyElem; |
| 288 | } else if (current === bodyElem) { |
| 289 | return { x: 'visible', y: 'visible' }; |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | var overflow = { |
| 294 | x: getEffectiveStyle(overflowElem, 'overflow-x') || 'visible', |
| 295 | y: getEffectiveStyle(overflowElem, 'overflow-y') || 'visible', |
| 296 | }; |
| 297 | |
| 298 | if (current === htmlElem) { |
| 299 | overflow.x = overflow.x === 'visible' ? 'auto' : overflow.x; |
| 300 | overflow.y = overflow.y === 'visible' ? 'auto' : overflow.y; |
| 301 | } |
| 302 | |
| 303 | return overflow; |
| 304 | } |
| 305 | |
| 306 | function getScroll(current: Element): Coordinate { |
| 307 | if (current === htmlElem) { |
no test coverage detected