@carbon/react
Version:
React components for the Carbon Design System
23 lines (21 loc) • 745 B
JavaScript
/**
* Copyright IBM Corp. 2016, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
//#region src/internal/environment.ts
/**
* Copyright IBM Corp. 2016, 2025
*
* 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);
//#endregion
export { canUseDOM };