- From: Simon Pieters <notifications@github.com>
- Date: Mon, 20 Apr 2015 02:39:02 -0700
- To: w3ctag/spec-reviews <spec-reviews@noreply.github.com>
Received on Monday, 20 April 2015 09:39:29 UTC
With polyfill:
```html
<!-- in <head> if necessary, otherwise before </body> -->
<script src="scrollingelement.js"></script>
```
```js
document.scrollingElement.scrollTop = 100;
```
without polyfill, fall back to UA check
```js
function getScrollingElement() {
if ("scrollingElement" in document) {
return document.scrollingElement;
}
return /* whatever UA check they use now */;
}
```
```js
getScrollingElement().scrollTop = 100;
```
---
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/spec-reviews/issues/51#issuecomment-94408724
Received on Monday, 20 April 2015 09:39:29 UTC