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