()
| 4377 | } |
| 4378 | |
| 4379 | function getYOffset() { |
| 4380 | |
| 4381 | var offset = scroll.yOffset; |
| 4382 | |
| 4383 | if (isFunction(offset)) { |
| 4384 | offset = offset(); |
| 4385 | } else if (isElement(offset)) { |
| 4386 | var elem = offset[0]; |
| 4387 | var style = $window.getComputedStyle(elem); |
| 4388 | if (style.position !== 'fixed') { |
| 4389 | offset = 0; |
| 4390 | } else { |
| 4391 | offset = elem.getBoundingClientRect().bottom; |
| 4392 | } |
| 4393 | } else if (!isNumber(offset)) { |
| 4394 | offset = 0; |
| 4395 | } |
| 4396 | |
| 4397 | return offset; |
| 4398 | } |
| 4399 | |
| 4400 | function scrollTo(elem) { |
| 4401 | if (elem) { |
no test coverage detected