Skip to content

Commit c470ad8

Browse files
committed
Rename ContinuousEvent to DefaultEvent
1 parent eeb1325 commit c470ad8

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

packages/react-dom/src/events/DOMEventProperties.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
import {
2121
DiscreteEvent,
2222
UserBlockingEvent,
23-
ContinuousEvent,
23+
DefaultEvent,
2424
} from 'shared/ReactTypes';
2525

2626
import {enableCreateEventHandleAPI} from 'shared/ReactFeatureFlags';
@@ -116,7 +116,7 @@ const userBlockingPairsForSimpleEventPlugin: Array<string | DOMEventName> = [
116116
];
117117

118118
// prettier-ignore
119-
const continuousPairsForSimpleEventPlugin: Array<string | DOMEventName> = [
119+
const defaultPairsForSimpleEventPlugin: Array<string | DOMEventName> = [
120120
('abort': DOMEventName), 'abort',
121121
(ANIMATION_END: DOMEventName), 'animationEnd',
122122
(ANIMATION_ITERATION: DOMEventName), 'animationIteration',
@@ -190,10 +190,10 @@ export function getEventPriorityForPluginSystem(
190190
domEventName: DOMEventName,
191191
): EventPriority {
192192
const priority = eventPriorities.get(domEventName);
193-
// Default to a ContinuousEvent. Note: we might
193+
// Default to a DefaultEvent. Note: we might
194194
// want to warn if we can't detect the priority
195195
// for the event.
196-
return priority === undefined ? ContinuousEvent : priority;
196+
return priority === undefined ? DefaultEvent : priority;
197197
}
198198

199199
export function getEventPriorityForListenerSystem(
@@ -210,7 +210,7 @@ export function getEventPriorityForListenerSystem(
210210
type,
211211
);
212212
}
213-
return ContinuousEvent;
213+
return DefaultEvent;
214214
}
215215

216216
export function registerSimpleEvents() {
@@ -223,8 +223,8 @@ export function registerSimpleEvents() {
223223
UserBlockingEvent,
224224
);
225225
registerSimplePluginEventsAndSetTheirPriorities(
226-
continuousPairsForSimpleEventPlugin,
227-
ContinuousEvent,
226+
defaultPairsForSimpleEventPlugin,
227+
DefaultEvent,
228228
);
229229
setEventPriorities(otherDiscreteEvents, DiscreteEvent);
230230
}

packages/react-dom/src/events/ReactDOMEventListener.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
} from 'shared/ReactFeatureFlags';
4646
import {
4747
UserBlockingEvent,
48-
ContinuousEvent,
48+
DefaultEvent,
4949
DiscreteEvent,
5050
} from 'shared/ReactTypes';
5151
import {getEventPriorityForPluginSystem} from './DOMEventProperties';
@@ -121,7 +121,7 @@ export function createEventListenerWrapperWithPriority(
121121
case UserBlockingEvent:
122122
listenerWrapper = dispatchUserBlockingUpdate;
123123
break;
124-
case ContinuousEvent:
124+
case DefaultEvent:
125125
default:
126126
listenerWrapper = dispatchEvent;
127127
break;

packages/shared/ReactTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export type EventPriority = 0 | 1 | 2;
9090

9191
export const DiscreteEvent: EventPriority = 0;
9292
export const UserBlockingEvent: EventPriority = 1;
93-
export const ContinuousEvent: EventPriority = 2;
93+
export const DefaultEvent: EventPriority = 2;
9494

9595
export type ReactFundamentalComponentInstance<C, H> = {|
9696
currentFiber: Object,

0 commit comments

Comments
 (0)