Travis build: 391

This commit is contained in:
Travis CI
2017-12-28 08:30:19 +00:00
parent 294a22ea5e
commit 203edf9ba2
141 changed files with 1389 additions and 1044 deletions

View File

@ -6,11 +6,12 @@ Use `pageXOffset` and `pageYOffset` if they are defined, otherwise `scrollLeft`
You can omit `el` to use a default value of `window`.
```js
const getScrollPosition = (el = window) =>
({x: (el.pageXOffset !== undefined) ? el.pageXOffset : el.scrollLeft,
y: (el.pageYOffset !== undefined) ? el.pageYOffset : el.scrollTop});
const getScrollPosition = (el = window) => ({
x: el.pageXOffset !== undefined ? el.pageXOffset : el.scrollLeft,
y: el.pageYOffset !== undefined ? el.pageYOffset : el.scrollTop
});
```
```js
getScrollPosition() // {x: 0, y: 200}
getScrollPosition(); // {x: 0, y: 200}
```