(node)
| 3 | declare function getWindow(node: Node | Window): Window; |
| 4 | |
| 5 | export default function getWindow(node) { |
| 6 | if (node == null) { |
| 7 | return window; |
| 8 | } |
| 9 | |
| 10 | if (node.toString() !== '[object Window]') { |
| 11 | const ownerDocument = node.ownerDocument; |
| 12 | return ownerDocument ? ownerDocument.defaultView || window : window; |
| 13 | } |
| 14 | |
| 15 | return node; |
| 16 | } |
no outgoing calls
no test coverage detected