diff options
Diffstat (limited to 'node_modules/fbjs/lib/getDocumentScrollElement.js.flow')
-rw-r--r-- | node_modules/fbjs/lib/getDocumentScrollElement.js.flow | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/node_modules/fbjs/lib/getDocumentScrollElement.js.flow b/node_modules/fbjs/lib/getDocumentScrollElement.js.flow index 2711fb162..8ec67c920 100644 --- a/node_modules/fbjs/lib/getDocumentScrollElement.js.flow +++ b/node_modules/fbjs/lib/getDocumentScrollElement.js.flow @@ -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. * * @providesModule getDocumentScrollElement * @typechecks @@ -25,6 +23,9 @@ const 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; } |