katoikia-app/web-ui/web-react/node_modules/dom-helpers/esm/isWindow.js

6 lines
216 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
import isDocument from './isDocument';
export default function isWindow(node) {
if ('window' in node && node.window === node) return node;
if (isDocument(node)) return node.defaultView || false;
return false;
}