UNPKG

@carbon/react

Version:

React components for the Carbon Design System

16 lines (13 loc) 526 B
/** * Copyright IBM Corp. 2016, 2023 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ /** * Indicate whether current execution environment can access the DOM. * * @see https://github.com/facebook/fbjs/blob/4d1751311d3f67af2dcce2e40df8512a23c7b9c6/packages/fbjs/src/core/ExecutionEnvironment.js#L12 */ const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); export { canUseDOM };