/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
v17.0.2
packages/shared/ExecutionEnvironment.js
14 строк
377 B
FUJI Goro
give `canUseDOM` with a possibility to be a constant (#14194)
25 апр 2019, 13:28
25 апр 2019, 13:28
1eb2b89
Код
Авторство
О чём код?
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ export const canUseDOM: boolean = !!( typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' );