text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined;
  
  var _defineProperty = require('./define-property');
  
  var _defineProperty2 = _interopRequireDefault(_defineProperty);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  // Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js
  var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
  
  var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window;
  var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window;
  
  // IE8+ Support
  var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window;
  var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window;
  
  // Passive options
  // Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js
  var passiveOption = exports.passiveOption = function () {
    var cache = null;
  
    return function () {
      if (cache !== null) {
        return cache;
      }
  
      var supportsPassiveOption = false;
  
      try {
        window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', {
          get: function get() {
            supportsPassiveOption = true;
          }
        }));
      } catch (e) {} // eslint-disable-line no-empty
  
      cache = supportsPassiveOption;
  
      return supportsPassiveOption;
    }();
  }();