1 | ;
|
2 |
|
3 | /**
|
4 | * Copyright (c) Facebook, Inc. and its affiliates.
|
5 | *
|
6 | * This source code is licensed under the MIT license found in the
|
7 | * LICENSE file in the root directory of this source tree.
|
8 | *
|
9 | * @format
|
10 | *
|
11 | * @emails oncall+draft_js
|
12 | */
|
13 | function getWindowForNode(node) {
|
14 | if (!node || !node.ownerDocument || !node.ownerDocument.defaultView) {
|
15 | return window;
|
16 | }
|
17 |
|
18 | return node.ownerDocument.defaultView;
|
19 | }
|
20 |
|
21 | module.exports = getWindowForNode; |
\ | No newline at end of file |