GoScrobble/web/node_modules/dom-helpers/esm/isWindow.js

6 lines
216 B
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +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;
}