{"version":3,"file":"isEventSupported.mjs","sources":["../../../../node_modules/normalize-wheel/src/isEventSupported.js"],"sourcesContent":["/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n  useHasFeature =\n    document.implementation &&\n    document.implementation.hasFeature &&\n    // always returns true in newer browsers as per the standard.\n    // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n    document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n  if (!ExecutionEnvironment.canUseDOM ||\n      capture && !('addEventListener' in document)) {\n    return false;\n  }\n\n  var eventName = 'on' + eventNameSuffix;\n  var isSupported = eventName in document;\n\n  if (!isSupported) {\n    var element = document.createElement('div');\n    element.setAttribute(eventName, 'return;');\n    isSupported = typeof element[eventName] === 'function';\n  }\n\n  if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n    // This is the only way to test support for the `wheel` event in IE9+.\n    isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n  }\n\n  return isSupported;\n}\n\nmodule.exports = isEventSupported;\n"],"names":["useHasFeature","ExecutionEnvironment","require$$0","canUseDOM","document","implementation","hasFeature","isEventSupported_1","isEventSupported","eventNameSuffix","capture","eventName","isSupported","element","createElement","setAttribute"],"mappings":"+CAaA,IAEIA,EAFAC,EAAuBC,EAGvBD,EAAqBE,YACvBH,EACEI,SAASC,gBACTD,SAASC,eAAeC,aAGuB,IAA/CF,SAASC,eAAeC,WAAW,GAAI;;;;;;;;;;;;;;IAwC3C,IAAAC,EAvBA,SAASC,iBAAiBC,EAAiBC,GACzC,IAAKT,EAAqBE,WACtBO,KAAa,qBAAsBN,UACrC,OAAO,EAGT,IAAIO,EAAY,KAAOF,EACnBG,EAAcD,KAAaP,SAE/B,IAAKQ,EAAa,CAChB,IAAIC,EAAUT,SAASU,cAAc,OACrCD,EAAQE,aAAaJ,EAAW,WAChCC,EAA4C,mBAAvBC,EAAQF,EAC9B,CAOD,OALKC,GAAeZ,GAAqC,UAApBS,IAEnCG,EAAcR,SAASC,eAAeC,WAAW,eAAgB,QAG5DM,CACT","x_google_ignoreList":[0]}