diff options
Diffstat (limited to 'node_modules/fbjs/lib/getDocumentScrollElement.js')
-rw-r--r-- | node_modules/fbjs/lib/getDocumentScrollElement.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/node_modules/fbjs/lib/getDocumentScrollElement.js b/node_modules/fbjs/lib/getDocumentScrollElement.js index cf40511b0..007b8869a 100644 --- a/node_modules/fbjs/lib/getDocumentScrollElement.js +++ b/node_modules/fbjs/lib/getDocumentScrollElement.js @@ -1,10 +1,8 @@ /** * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. * * @typechecks */ @@ -24,6 +22,9 @@ var isWebkit = typeof navigator !== 'undefined' && navigator.userAgent.indexOf(' */ function getDocumentScrollElement(doc) { doc = doc || document; + if (doc.scrollingElement) { + return doc.scrollingElement; + } return !isWebkit && doc.compatMode === 'CSS1Compat' ? doc.documentElement : doc.body; } |