()
| 5316 | } |
| 5317 | |
| 5318 | function getYOffset() { |
| 5319 | |
| 5320 | var offset = scroll.yOffset; |
| 5321 | |
| 5322 | if (isFunction(offset)) { |
| 5323 | offset = offset(); |
| 5324 | } else if (isElement(offset)) { |
| 5325 | var elem = offset[0]; |
| 5326 | var style = $window.getComputedStyle(elem); |
| 5327 | if (style.position !== 'fixed') { |
| 5328 | offset = 0; |
| 5329 | } else { |
| 5330 | offset = elem.getBoundingClientRect().bottom; |
| 5331 | } |
| 5332 | } else if (!isNumber(offset)) { |
| 5333 | offset = 0; |
| 5334 | } |
| 5335 | |
| 5336 | return offset; |
| 5337 | } |
| 5338 | |
| 5339 | function scrollTo(elem) { |
| 5340 | if (elem) { |
no test coverage detected