mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
committed by
Paul O’Shannessy
parent
74ea71b324
commit
60cc2fe911
@@ -173,9 +173,21 @@ Object.assign(SyntheticEvent.prototype, {
|
||||
this[shouldBeReleasedProperties[i]] = null;
|
||||
}
|
||||
if (__DEV__) {
|
||||
Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
||||
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
|
||||
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
|
||||
Object.defineProperty(
|
||||
this,
|
||||
'nativeEvent',
|
||||
getPooledWarningPropertyDefinition('nativeEvent', null)
|
||||
);
|
||||
Object.defineProperty(
|
||||
this,
|
||||
'preventDefault',
|
||||
getPooledWarningPropertyDefinition('preventDefault', emptyFunction)
|
||||
);
|
||||
Object.defineProperty(
|
||||
this,
|
||||
'stopPropagation',
|
||||
getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -394,7 +394,9 @@ function diffProperties(
|
||||
// default: fallthrough case when nested properties are defined
|
||||
removedKeys = null;
|
||||
removedKeyCount = 0;
|
||||
// $FlowFixMe - We think that attributeConfig is not CustomAttributeConfiguration at this point so we assume it must be AttributeConfiguration.
|
||||
// $FlowFixMe - We think that attributeConfig is not
|
||||
// CustomAttributeConfiguration at this point so we assume
|
||||
// it must be AttributeConfiguration.
|
||||
updatePayload = diffNestedProperty(
|
||||
updatePayload,
|
||||
prevProp,
|
||||
|
||||
@@ -42,7 +42,12 @@ export type ReactYield = {
|
||||
continuation: mixed
|
||||
};
|
||||
|
||||
exports.createCoroutine = function<T>(children : mixed, handler : CoroutineHandler<T>, props : T, key : ?string = null) : ReactCoroutine {
|
||||
exports.createCoroutine = function<T>(
|
||||
children : mixed,
|
||||
handler : CoroutineHandler<T>,
|
||||
props : T,
|
||||
key : ?string = null
|
||||
) : ReactCoroutine {
|
||||
var coroutine = {
|
||||
// This tag allow us to uniquely identify this as a React Coroutine
|
||||
$$typeof: REACT_COROUTINE_TYPE,
|
||||
|
||||
Reference in New Issue
Block a user