12345678910111213141516171819202122232425262728293031 |
- 'use strict';
- var isWebkit = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('AppleWebKit') > -1;
- function getDocumentScrollElement(doc) {
- doc = doc || document;
- if (doc.scrollingElement) {
- return doc.scrollingElement;
- }
- return !isWebkit && doc.compatMode === 'CSS1Compat' ? doc.documentElement : doc.body;
- }
- module.exports = getDocumentScrollElement;
|