UNPKG

get-window

Version:

Returns the `window` object from a DOM object

5 lines (4 loc) 285 B
// this is a browser-only module. There is a non-browser equivalent in the same // directory. This is done using a `package.json` browser field. // old-IE fallback logic: http://stackoverflow.com/a/10260692 module.exports = !!document.attachEvent && window !== document.parentWindow;