mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
* shared/src -> shared It's not a real package and doesn't even have package.json. This will also make importing less weird if we drop Haste. * Get rid of shared/utils Moved event-specific into shared/event. Moved rest to the root since distinction has always been pretty arbitrary. * Fix references to old shared/src paths
102 lines
2.8 KiB
JavaScript
102 lines
2.8 KiB
JavaScript
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @providesModule BrowserEventConstants
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var getVendorPrefixedEventName = require('getVendorPrefixedEventName');
|
|
|
|
/**
|
|
* Types of raw signals from the browser caught at the top level.
|
|
*
|
|
* For events like 'submit' which don't consistently bubble (which we
|
|
* trap at a lower node than `document`), binding at `document` would
|
|
* cause duplicate events so we don't include them here.
|
|
*/
|
|
var topLevelTypes = {
|
|
topAbort: 'abort',
|
|
topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
|
|
topAnimationIteration: getVendorPrefixedEventName('animationiteration') ||
|
|
'animationiteration',
|
|
topAnimationStart: getVendorPrefixedEventName('animationstart') ||
|
|
'animationstart',
|
|
topBlur: 'blur',
|
|
topCancel: 'cancel',
|
|
topCanPlay: 'canplay',
|
|
topCanPlayThrough: 'canplaythrough',
|
|
topChange: 'change',
|
|
topClick: 'click',
|
|
topClose: 'close',
|
|
topCompositionEnd: 'compositionend',
|
|
topCompositionStart: 'compositionstart',
|
|
topCompositionUpdate: 'compositionupdate',
|
|
topContextMenu: 'contextmenu',
|
|
topCopy: 'copy',
|
|
topCut: 'cut',
|
|
topDoubleClick: 'dblclick',
|
|
topDrag: 'drag',
|
|
topDragEnd: 'dragend',
|
|
topDragEnter: 'dragenter',
|
|
topDragExit: 'dragexit',
|
|
topDragLeave: 'dragleave',
|
|
topDragOver: 'dragover',
|
|
topDragStart: 'dragstart',
|
|
topDrop: 'drop',
|
|
topDurationChange: 'durationchange',
|
|
topEmptied: 'emptied',
|
|
topEncrypted: 'encrypted',
|
|
topEnded: 'ended',
|
|
topError: 'error',
|
|
topFocus: 'focus',
|
|
topInput: 'input',
|
|
topKeyDown: 'keydown',
|
|
topKeyPress: 'keypress',
|
|
topKeyUp: 'keyup',
|
|
topLoadedData: 'loadeddata',
|
|
topLoad: 'load',
|
|
topLoadedMetadata: 'loadedmetadata',
|
|
topLoadStart: 'loadstart',
|
|
topMouseDown: 'mousedown',
|
|
topMouseMove: 'mousemove',
|
|
topMouseOut: 'mouseout',
|
|
topMouseOver: 'mouseover',
|
|
topMouseUp: 'mouseup',
|
|
topPaste: 'paste',
|
|
topPause: 'pause',
|
|
topPlay: 'play',
|
|
topPlaying: 'playing',
|
|
topProgress: 'progress',
|
|
topRateChange: 'ratechange',
|
|
topScroll: 'scroll',
|
|
topSeeked: 'seeked',
|
|
topSeeking: 'seeking',
|
|
topSelectionChange: 'selectionchange',
|
|
topStalled: 'stalled',
|
|
topSuspend: 'suspend',
|
|
topTextInput: 'textInput',
|
|
topTimeUpdate: 'timeupdate',
|
|
topToggle: 'toggle',
|
|
topTouchCancel: 'touchcancel',
|
|
topTouchEnd: 'touchend',
|
|
topTouchMove: 'touchmove',
|
|
topTouchStart: 'touchstart',
|
|
topTransitionEnd: getVendorPrefixedEventName('transitionend') ||
|
|
'transitionend',
|
|
topVolumeChange: 'volumechange',
|
|
topWaiting: 'waiting',
|
|
topWheel: 'wheel',
|
|
};
|
|
|
|
export type TopLevelTypes = $Enum<typeof topLevelTypes>;
|
|
|
|
var BrowserEventConstants = {
|
|
topLevelTypes,
|
|
};
|
|
|
|
module.exports = BrowserEventConstants;
|