/**1* Copyright 2013-2015, Facebook, Inc.2* All rights reserved.3*4* This source code is licensed under the BSD-style license found in the5* LICENSE file in the root directory of this source tree. An additional grant6* of patent rights can be found in the PATENTS file in the same directory.7*8* @providesModule ExecutionEnvironment9*/1011/*jslint evil: true */1213"use strict";1415var canUseDOM = !!(16(typeof window !== 'undefined' &&17window.document && window.document.createElement)18);1920/**21* Simple, lightweight module assisting with the detection and context of22* Worker. Helps avoid circular dependencies and allows code to reason about23* whether or not they are in a Worker, even if they never include the main24* `ReactWorker` dependency.25*/26var ExecutionEnvironment = {2728canUseDOM: canUseDOM,2930canUseWorkers: typeof Worker !== 'undefined',3132canUseEventListeners:33canUseDOM && !!(window.addEventListener || window.attachEvent),3435canUseViewport: canUseDOM && !!window.screen,3637isInWorker: !canUseDOM // For now, this is true - might change in the future.3839};4041module.exports = ExecutionEnvironment;424344