-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Replace top-level event types with numbers #11894
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* 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. | ||
* | ||
* @flow | ||
*/ | ||
|
||
export const TOP_ABORT = 0; | ||
export const TOP_ANIMATION_END = 1; | ||
export const TOP_ANIMATION_ITERATION = 2; | ||
export const TOP_ANIMATION_START = 3; | ||
export const TOP_BLUR = 4; | ||
export const TOP_CANCEL = 5; | ||
export const TOP_CAN_PLAY = 6; | ||
export const TOP_CAN_PLAY_THROUGH = 7; | ||
export const TOP_CHANGE = 8; | ||
export const TOP_CLICK = 9; | ||
export const TOP_CLOSE = 10; | ||
export const TOP_COMPOSITION_END = 11; | ||
export const TOP_COMPOSITION_START = 12; | ||
export const TOP_COMPOSITION_UPDATE = 13; | ||
export const TOP_CONTEXT_MENU = 14; | ||
export const TOP_COPY = 15; | ||
export const TOP_CUT = 16; | ||
export const TOP_DOUBLE_CLICK = 17; | ||
export const TOP_DRAG = 18; | ||
export const TOP_DRAG_END = 19; | ||
export const TOP_DRAG_ENTER = 20; | ||
export const TOP_DRAG_EXIT = 21; | ||
export const TOP_DRAG_LEAVE = 22; | ||
export const TOP_DRAG_OVER = 23; | ||
export const TOP_DRAG_START = 24; | ||
export const TOP_DROP = 25; | ||
export const TOP_DURATION_CHANGE = 26; | ||
export const TOP_EMPTIED = 27; | ||
export const TOP_ENCRYPTED = 28; | ||
export const TOP_ENDED = 29; | ||
export const TOP_ERROR = 30; | ||
export const TOP_FOCUS = 31; | ||
export const TOP_INPUT = 32; | ||
export const TOP_INVALID = 33; | ||
export const TOP_KEY_DOWN = 34; | ||
export const TOP_KEY_PRESS = 35; | ||
export const TOP_KEY_UP = 36; | ||
export const TOP_LOADED_DATA = 37; | ||
export const TOP_LOAD = 38; | ||
export const TOP_LOADED_METADATA = 39; | ||
export const TOP_LOAD_START = 40; | ||
export const TOP_MOUSE_DOWN = 41; | ||
export const TOP_MOUSE_MOVE = 42; | ||
export const TOP_MOUSE_OUT = 43; | ||
export const TOP_MOUSE_OVER = 44; | ||
export const TOP_MOUSE_UP = 45; | ||
export const TOP_PASTE = 46; | ||
export const TOP_PAUSE = 47; | ||
export const TOP_PLAY = 48; | ||
export const TOP_PLAYING = 49; | ||
export const TOP_PROGRESS = 50; | ||
export const TOP_RATE_CHANGE = 51; | ||
export const TOP_RESET = 52; | ||
export const TOP_SCROLL = 53; | ||
export const TOP_SEEKED = 54; | ||
export const TOP_SEEKING = 55; | ||
export const TOP_SELECTION_CHANGE = 56; | ||
export const TOP_STALLED = 57; | ||
export const TOP_SUBMIT = 58; | ||
export const TOP_SUSPEND = 59; | ||
export const TOP_TEXT_INPUT = 60; | ||
export const TOP_TIME_UPDATE = 61; | ||
export const TOP_TOGGLE = 62; | ||
export const TOP_TOUCH_CANCEL = 63; | ||
export const TOP_TOUCH_END = 64; | ||
export const TOP_TOUCH_MOVE = 65; | ||
export const TOP_TOUCH_START = 66; | ||
export const TOP_TRANSITION_END = 67; | ||
export const TOP_VOLUME_CHANGE = 68; | ||
export const TOP_WAITING = 69; | ||
export const TOP_WHEEL = 70; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove all of these event name strings like
'load'
if we havetrapBubbledEvent
/trapCaptureEvent
callgetRawEventName
directly. Assuming we never call it with a mismatched top-level type and event. I don't think we do.