GT2/Ejectable/node_modules/@unimodules/react-native-adapter/build/environment/browser.web.js

6 lines
402 B
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
// Used for delegating node actions when browser APIs aren't available
// like in SSR websites.
export const isDOMAvailable = typeof window !== 'undefined' && !!window.document?.createElement;
export const canUseEventListeners = isDOMAvailable && !!(window.addEventListener || window.attachEvent);
export const canUseViewport = isDOMAvailable && !!window.screen;
//# sourceMappingURL=browser.web.js.map