react-dom 15.5.3 → 15.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/react-dom-server.js +722 -604
  2. package/dist/react-dom-server.min.js +5 -5
  3. package/dist/react-dom.js +849 -659
  4. package/dist/react-dom.min.js +6 -5
  5. package/lib/BeforeInputEventPlugin.js +0 -1
  6. package/lib/CSSProperty.js +6 -0
  7. package/lib/CSSPropertyOperations.js +14 -8
  8. package/lib/ChangeEventPlugin.js +49 -83
  9. package/lib/DOMChildrenOperations.js +4 -3
  10. package/lib/DOMProperty.js +0 -1
  11. package/lib/DOMPropertyOperations.js +0 -2
  12. package/lib/Danger.js +0 -2
  13. package/lib/EnterLeaveEventPlugin.js +0 -2
  14. package/lib/EventPluginHub.js +0 -4
  15. package/lib/EventPluginRegistry.js +0 -2
  16. package/lib/LinkedValueUtils.js +7 -7
  17. package/lib/ReactBrowserEventEmitter.js +0 -4
  18. package/lib/ReactChildFiber.js +0 -1
  19. package/lib/ReactChildReconciler.js +4 -5
  20. package/lib/ReactComponentBrowserEnvironment.js +0 -2
  21. package/lib/ReactComponentEnvironment.js +0 -2
  22. package/lib/ReactCompositeComponent.js +1 -3
  23. package/lib/ReactDOM.js +2 -2
  24. package/lib/ReactDOMComponent.js +33 -24
  25. package/lib/ReactDOMFiber.js +0 -1
  26. package/lib/ReactDOMIDOperations.js +0 -1
  27. package/lib/ReactDOMInput.js +5 -3
  28. package/lib/ReactDOMOption.js +0 -1
  29. package/lib/ReactDOMTextComponent.js +0 -2
  30. package/lib/ReactDebugTool.js +3 -1
  31. package/lib/ReactEventEmitterMixin.js +0 -1
  32. package/lib/ReactFiber.js +0 -2
  33. package/lib/ReactFiberBeginWork.js +0 -1
  34. package/lib/ReactFiberCommitWork.js +0 -1
  35. package/lib/ReactFiberCompleteWork.js +0 -2
  36. package/lib/ReactInputSelection.js +0 -1
  37. package/lib/ReactInstanceMap.js +0 -2
  38. package/lib/ReactMount.js +7 -7
  39. package/lib/ReactMultiChild.js +0 -4
  40. package/lib/ReactOwner.js +0 -1
  41. package/lib/ReactPerf.js +6 -6
  42. package/lib/ReactPriorityLevel.js +2 -1
  43. package/lib/ReactReconciler.js +2 -4
  44. package/lib/ReactShallowRenderer.js +6 -0
  45. package/lib/ReactSimpleEmptyComponent.js +2 -2
  46. package/lib/ReactTestUtils.js +1 -0
  47. package/lib/ReactUpdateQueue.js +1 -3
  48. package/lib/ReactVersion.js +1 -1
  49. package/lib/ResponderEventPlugin.js +0 -2
  50. package/lib/SelectEventPlugin.js +0 -3
  51. package/lib/SimpleEventPlugin.js +0 -2
  52. package/lib/SyntheticEvent.js +4 -6
  53. package/lib/SyntheticWheelEvent.js +3 -6
  54. package/lib/TapEventPlugin.js +0 -2
  55. package/lib/Transaction.js +3 -0
  56. package/lib/ViewportMetrics.js +0 -2
  57. package/lib/dangerousStyleValue.js +2 -2
  58. package/lib/deprecated.js +3 -3
  59. package/lib/escapeTextContentForBrowser.js +0 -1
  60. package/lib/getEventKey.js +24 -14
  61. package/lib/getEventModifierState.js +4 -4
  62. package/lib/inputValueTracking.js +122 -0
  63. package/lib/instantiateReactComponent.js +1 -1
  64. package/lib/isTextInputElement.js +14 -14
  65. package/lib/lowPriorityWarning.js +64 -0
  66. package/lib/setInnerHTML.js +1 -1
  67. package/lib/traverseAllChildren.js +1 -1
  68. package/lib/validateDOMNesting.js +1 -7
  69. package/package.json +3 -3
@@ -373,7 +373,6 @@ function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEv
373
373
  * `composition` event types.
374
374
  */
375
375
  var BeforeInputEventPlugin = {
376
-
377
376
  eventTypes: eventTypes,
378
377
 
379
378
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
@@ -30,7 +30,13 @@ var isUnitlessNumber = {
30
30
  flexNegative: true,
31
31
  flexOrder: true,
32
32
  gridRow: true,
33
+ gridRowEnd: true,
34
+ gridRowSpan: true,
35
+ gridRowStart: true,
33
36
  gridColumn: true,
37
+ gridColumnEnd: true,
38
+ gridColumnSpan: true,
39
+ gridColumnStart: true,
34
40
  fontWeight: true,
35
41
  lineClamp: true,
36
42
  lineHeight: true,
@@ -75,7 +75,7 @@ if (process.env.NODE_ENV !== 'production') {
75
75
  }
76
76
 
77
77
  warnedStyleValues[value] = true;
78
- process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
78
+ process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
79
79
  };
80
80
 
81
81
  var warnStyleValueIsNaN = function (name, value, owner) {
@@ -125,7 +125,6 @@ if (process.env.NODE_ENV !== 'production') {
125
125
  * Operations for dealing with CSS properties.
126
126
  */
127
127
  var CSSPropertyOperations = {
128
-
129
128
  /**
130
129
  * Serializes a mapping of style properties for use as inline styles:
131
130
  *
@@ -145,13 +144,16 @@ var CSSPropertyOperations = {
145
144
  if (!styles.hasOwnProperty(styleName)) {
146
145
  continue;
147
146
  }
147
+ var isCustomProperty = styleName.indexOf('--') === 0;
148
148
  var styleValue = styles[styleName];
149
149
  if (process.env.NODE_ENV !== 'production') {
150
- warnValidStyle(styleName, styleValue, component);
150
+ if (!isCustomProperty) {
151
+ warnValidStyle(styleName, styleValue, component);
152
+ }
151
153
  }
152
154
  if (styleValue != null) {
153
155
  serialized += processStyleName(styleName) + ':';
154
- serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
156
+ serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
155
157
  }
156
158
  }
157
159
  return serialized || null;
@@ -179,14 +181,19 @@ var CSSPropertyOperations = {
179
181
  if (!styles.hasOwnProperty(styleName)) {
180
182
  continue;
181
183
  }
184
+ var isCustomProperty = styleName.indexOf('--') === 0;
182
185
  if (process.env.NODE_ENV !== 'production') {
183
- warnValidStyle(styleName, styles[styleName], component);
186
+ if (!isCustomProperty) {
187
+ warnValidStyle(styleName, styles[styleName], component);
188
+ }
184
189
  }
185
- var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
190
+ var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
186
191
  if (styleName === 'float' || styleName === 'cssFloat') {
187
192
  styleName = styleFloatAccessor;
188
193
  }
189
- if (styleValue) {
194
+ if (isCustomProperty) {
195
+ style.setProperty(styleName, styleValue);
196
+ } else if (styleValue) {
190
197
  style[styleName] = styleValue;
191
198
  } else {
192
199
  var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
@@ -202,7 +209,6 @@ var CSSPropertyOperations = {
202
209
  }
203
210
  }
204
211
  }
205
-
206
212
  };
207
213
 
208
214
  module.exports = CSSPropertyOperations;
@@ -17,6 +17,7 @@ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
17
17
  var ReactUpdates = require('./ReactUpdates');
18
18
  var SyntheticEvent = require('./SyntheticEvent');
19
19
 
20
+ var inputValueTracking = require('./inputValueTracking');
20
21
  var getEventTarget = require('./getEventTarget');
21
22
  var isEventSupported = require('./isEventSupported');
22
23
  var isTextInputElement = require('./isTextInputElement');
@@ -31,13 +32,17 @@ var eventTypes = {
31
32
  }
32
33
  };
33
34
 
35
+ function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
36
+ var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
37
+ event.type = 'change';
38
+ EventPropagators.accumulateTwoPhaseDispatches(event);
39
+ return event;
40
+ }
34
41
  /**
35
42
  * For IE shims
36
43
  */
37
44
  var activeElement = null;
38
45
  var activeElementInst = null;
39
- var activeElementValue = null;
40
- var activeElementValueProp = null;
41
46
 
42
47
  /**
43
48
  * SECTION: handle `change` event
@@ -54,8 +59,7 @@ if (ExecutionEnvironment.canUseDOM) {
54
59
  }
55
60
 
56
61
  function manualDispatchChangeEvent(nativeEvent) {
57
- var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
58
- EventPropagators.accumulateTwoPhaseDispatches(event);
62
+ var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
59
63
 
60
64
  // If change and propertychange bubbled, we'd just bind to it like all the
61
65
  // other events and have it go through ReactBrowserEventEmitter. Since it
@@ -91,11 +95,21 @@ function stopWatchingForChangeEventIE8() {
91
95
  activeElementInst = null;
92
96
  }
93
97
 
98
+ function getInstIfValueChanged(targetInst, nativeEvent) {
99
+ var updated = inputValueTracking.updateValueIfChanged(targetInst);
100
+ var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
101
+
102
+ if (updated || simulated) {
103
+ return targetInst;
104
+ }
105
+ }
106
+
94
107
  function getTargetInstForChangeEvent(topLevelType, targetInst) {
95
108
  if (topLevelType === 'topChange') {
96
109
  return targetInst;
97
110
  }
98
111
  }
112
+
99
113
  function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
100
114
  if (topLevelType === 'topFocus') {
101
115
  // stopWatching() should be a noop here but we call it just in case we
@@ -114,105 +128,54 @@ var isInputEventSupported = false;
114
128
  if (ExecutionEnvironment.canUseDOM) {
115
129
  // IE9 claims to support the input event but fails to trigger it when
116
130
  // deleting text, so we ignore its input events.
117
- // IE10+ fire input events to often, such when a placeholder
118
- // changes or when an input with a placeholder is focused.
119
- isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
120
- }
121
131
 
122
- /**
123
- * (For IE <=11) Replacement getter/setter for the `value` property that gets
124
- * set on the active element.
125
- */
126
- var newValueProp = {
127
- get: function () {
128
- return activeElementValueProp.get.call(this);
129
- },
130
- set: function (val) {
131
- // Cast to a string so we can do equality checks.
132
- activeElementValue = '' + val;
133
- activeElementValueProp.set.call(this, val);
134
- }
135
- };
132
+ isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9);
133
+ }
136
134
 
137
135
  /**
138
- * (For IE <=11) Starts tracking propertychange events on the passed-in element
136
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
139
137
  * and override the value property so that we can distinguish user events from
140
138
  * value changes in JS.
141
139
  */
142
140
  function startWatchingForValueChange(target, targetInst) {
143
141
  activeElement = target;
144
142
  activeElementInst = targetInst;
145
- activeElementValue = target.value;
146
- activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
147
-
148
- // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
149
- // on DOM elements
150
- Object.defineProperty(activeElement, 'value', newValueProp);
151
- if (activeElement.attachEvent) {
152
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
153
- } else {
154
- activeElement.addEventListener('propertychange', handlePropertyChange, false);
155
- }
143
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
156
144
  }
157
145
 
158
146
  /**
159
- * (For IE <=11) Removes the event listeners from the currently-tracked element,
147
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
160
148
  * if any exists.
161
149
  */
162
150
  function stopWatchingForValueChange() {
163
151
  if (!activeElement) {
164
152
  return;
165
153
  }
166
-
167
- // delete restores the original property definition
168
- delete activeElement.value;
169
-
170
- if (activeElement.detachEvent) {
171
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
172
- } else {
173
- activeElement.removeEventListener('propertychange', handlePropertyChange, false);
174
- }
154
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
175
155
 
176
156
  activeElement = null;
177
157
  activeElementInst = null;
178
- activeElementValue = null;
179
- activeElementValueProp = null;
180
158
  }
181
159
 
182
160
  /**
183
- * (For IE <=11) Handles a propertychange event, sending a `change` event if
161
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
184
162
  * the value of the active element has changed.
185
163
  */
186
164
  function handlePropertyChange(nativeEvent) {
187
165
  if (nativeEvent.propertyName !== 'value') {
188
166
  return;
189
167
  }
190
- var value = nativeEvent.srcElement.value;
191
- if (value === activeElementValue) {
192
- return;
193
- }
194
- activeElementValue = value;
195
-
196
- manualDispatchChangeEvent(nativeEvent);
197
- }
198
-
199
- /**
200
- * If a `change` event should be fired, returns the target's ID.
201
- */
202
- function getTargetInstForInputEvent(topLevelType, targetInst) {
203
- if (topLevelType === 'topInput') {
204
- // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
205
- // what we want so fall through here and trigger an abstract event
206
- return targetInst;
168
+ if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
169
+ manualDispatchChangeEvent(nativeEvent);
207
170
  }
208
171
  }
209
172
 
210
- function handleEventsForInputEventIE(topLevelType, target, targetInst) {
173
+ function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
211
174
  if (topLevelType === 'topFocus') {
212
175
  // In IE8, we can capture almost all .value changes by adding a
213
176
  // propertychange handler and looking for events with propertyName
214
177
  // equal to 'value'
215
- // In IE9-11, propertychange fires for most input events but is buggy and
178
+ // In IE9, propertychange fires for most input events but is buggy and
216
179
  // doesn't fire when text is deleted, but conveniently, selectionchange
217
180
  // appears to fire in all of the remaining cases so we catch those and
218
181
  // forward the event if the value has changed
@@ -230,7 +193,7 @@ function handleEventsForInputEventIE(topLevelType, target, targetInst) {
230
193
  }
231
194
 
232
195
  // For IE8 and IE9.
233
- function getTargetInstForInputEventIE(topLevelType, targetInst) {
196
+ function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
234
197
  if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
235
198
  // On the selectionchange event, the target is just document which isn't
236
199
  // helpful for us so just check activeElement instead.
@@ -242,10 +205,7 @@ function getTargetInstForInputEventIE(topLevelType, targetInst) {
242
205
  // keystroke if user does a key repeat (it'll be a little delayed: right
243
206
  // before the second keystroke). Other input methods (e.g., paste) seem to
244
207
  // fire selectionchange normally.
245
- if (activeElement && activeElement.value !== activeElementValue) {
246
- activeElementValue = activeElement.value;
247
- return activeElementInst;
248
- }
208
+ return getInstIfValueChanged(activeElementInst, nativeEvent);
249
209
  }
250
210
  }
251
211
 
@@ -256,12 +216,19 @@ function shouldUseClickEvent(elem) {
256
216
  // Use the `click` event to detect changes to checkbox and radio inputs.
257
217
  // This approach works across all browsers, whereas `change` does not fire
258
218
  // until `blur` in IE8.
259
- return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
219
+ var nodeName = elem.nodeName;
220
+ return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
260
221
  }
261
222
 
262
- function getTargetInstForClickEvent(topLevelType, targetInst) {
223
+ function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
263
224
  if (topLevelType === 'topClick') {
264
- return targetInst;
225
+ return getInstIfValueChanged(targetInst, nativeEvent);
226
+ }
227
+ }
228
+
229
+ function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
230
+ if (topLevelType === 'topInput' || topLevelType === 'topChange') {
231
+ return getInstIfValueChanged(targetInst, nativeEvent);
265
232
  }
266
233
  }
267
234
 
@@ -296,9 +263,11 @@ function handleControlledInputBlur(inst, node) {
296
263
  * - select
297
264
  */
298
265
  var ChangeEventPlugin = {
299
-
300
266
  eventTypes: eventTypes,
301
267
 
268
+ _allowSimulatedPassThrough: true,
269
+ _isInputEventSupported: isInputEventSupported,
270
+
302
271
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
303
272
  var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
304
273
 
@@ -311,21 +280,19 @@ var ChangeEventPlugin = {
311
280
  }
312
281
  } else if (isTextInputElement(targetNode)) {
313
282
  if (isInputEventSupported) {
314
- getTargetInstFunc = getTargetInstForInputEvent;
283
+ getTargetInstFunc = getTargetInstForInputOrChangeEvent;
315
284
  } else {
316
- getTargetInstFunc = getTargetInstForInputEventIE;
317
- handleEventFunc = handleEventsForInputEventIE;
285
+ getTargetInstFunc = getTargetInstForInputEventPolyfill;
286
+ handleEventFunc = handleEventsForInputEventPolyfill;
318
287
  }
319
288
  } else if (shouldUseClickEvent(targetNode)) {
320
289
  getTargetInstFunc = getTargetInstForClickEvent;
321
290
  }
322
291
 
323
292
  if (getTargetInstFunc) {
324
- var inst = getTargetInstFunc(topLevelType, targetInst);
293
+ var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
325
294
  if (inst) {
326
- var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
327
- event.type = 'change';
328
- EventPropagators.accumulateTwoPhaseDispatches(event);
295
+ var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
329
296
  return event;
330
297
  }
331
298
  }
@@ -339,7 +306,6 @@ var ChangeEventPlugin = {
339
306
  handleControlledInputBlur(targetInst, targetNode);
340
307
  }
341
308
  }
342
-
343
309
  };
344
310
 
345
311
  module.exports = ChangeEventPlugin;
@@ -145,7 +145,6 @@ if (process.env.NODE_ENV !== 'production') {
145
145
  * Operations for updating with DOM children.
146
146
  */
147
147
  var DOMChildrenOperations = {
148
-
149
148
  dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
150
149
 
151
150
  replaceDelimitedText: replaceDelimitedText,
@@ -171,7 +170,10 @@ var DOMChildrenOperations = {
171
170
  ReactInstrumentation.debugTool.onHostOperation({
172
171
  instanceID: parentNodeDebugID,
173
172
  type: 'insert child',
174
- payload: { toIndex: update.toIndex, content: update.content.toString() }
173
+ payload: {
174
+ toIndex: update.toIndex,
175
+ content: update.content.toString()
176
+ }
175
177
  });
176
178
  }
177
179
  break;
@@ -218,7 +220,6 @@ var DOMChildrenOperations = {
218
220
  }
219
221
  }
220
222
  }
221
-
222
223
  };
223
224
 
224
225
  module.exports = DOMChildrenOperations;
@@ -136,7 +136,6 @@ var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\
136
136
  * @see http://jsperf.com/key-missing
137
137
  */
138
138
  var DOMProperty = {
139
-
140
139
  ID_ATTRIBUTE_NAME: 'data-reactid',
141
140
  ROOT_ATTRIBUTE_NAME: 'data-reactroot',
142
141
 
@@ -45,7 +45,6 @@ function shouldIgnoreValue(propertyInfo, value) {
45
45
  * Operations for dealing with DOM properties.
46
46
  */
47
47
  var DOMPropertyOperations = {
48
-
49
48
  /**
50
49
  * Creates markup for the ID property.
51
50
  *
@@ -230,7 +229,6 @@ var DOMPropertyOperations = {
230
229
  });
231
230
  }
232
231
  }
233
-
234
232
  };
235
233
 
236
234
  module.exports = DOMPropertyOperations;
package/lib/Danger.js CHANGED
@@ -20,7 +20,6 @@ var emptyFunction = require('fbjs/lib/emptyFunction');
20
20
  var invariant = require('fbjs/lib/invariant');
21
21
 
22
22
  var Danger = {
23
-
24
23
  /**
25
24
  * Replaces a node with a string of markup at its current position within its
26
25
  * parent. The markup must render into a single root node.
@@ -41,7 +40,6 @@ var Danger = {
41
40
  DOMLazyTree.replaceChildWithTree(oldChild, markup);
42
41
  }
43
42
  }
44
-
45
43
  };
46
44
 
47
45
  module.exports = Danger;
@@ -26,7 +26,6 @@ var eventTypes = {
26
26
  };
27
27
 
28
28
  var EnterLeaveEventPlugin = {
29
-
30
29
  eventTypes: eventTypes,
31
30
 
32
31
  /**
@@ -93,7 +92,6 @@ var EnterLeaveEventPlugin = {
93
92
 
94
93
  return [leave, enter];
95
94
  }
96
-
97
95
  };
98
96
 
99
97
  module.exports = EnterLeaveEventPlugin;
@@ -105,12 +105,10 @@ function shouldPreventMouseEvent(name, type, props) {
105
105
  * @public
106
106
  */
107
107
  var EventPluginHub = {
108
-
109
108
  /**
110
109
  * Methods for injecting dependencies.
111
110
  */
112
111
  injection: {
113
-
114
112
  /**
115
113
  * @param {array} InjectedEventPluginOrder
116
114
  * @public
@@ -121,7 +119,6 @@ var EventPluginHub = {
121
119
  * @param {object} injectedNamesToPlugins Map from names to plugin modules.
122
120
  */
123
121
  injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
124
-
125
122
  },
126
123
 
127
124
  /**
@@ -271,7 +268,6 @@ var EventPluginHub = {
271
268
  __getListenerBank: function () {
272
269
  return listenerBank;
273
270
  }
274
-
275
271
  };
276
272
 
277
273
  module.exports = EventPluginHub;
@@ -108,7 +108,6 @@ function publishRegistrationName(registrationName, pluginModule, eventName) {
108
108
  * @see {EventPluginHub}
109
109
  */
110
110
  var EventPluginRegistry = {
111
-
112
111
  /**
113
112
  * Ordered list of injected plugins.
114
113
  */
@@ -248,7 +247,6 @@ var EventPluginRegistry = {
248
247
  }
249
248
  }
250
249
  }
251
-
252
250
  };
253
251
 
254
252
  module.exports = EventPluginRegistry;
@@ -22,13 +22,13 @@ var invariant = require('fbjs/lib/invariant');
22
22
  var warning = require('fbjs/lib/warning');
23
23
 
24
24
  var hasReadOnlyValue = {
25
- 'button': true,
26
- 'checkbox': true,
27
- 'image': true,
28
- 'hidden': true,
29
- 'radio': true,
30
- 'reset': true,
31
- 'submit': true
25
+ button: true,
26
+ checkbox: true,
27
+ image: true,
28
+ hidden: true,
29
+ radio: true,
30
+ reset: true,
31
+ submit: true
32
32
  };
33
33
 
34
34
  function _assertSingleLink(inputProps) {
@@ -175,7 +175,6 @@ function getListeningForDocument(mountAt) {
175
175
  * @internal
176
176
  */
177
177
  var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
178
-
179
178
  /**
180
179
  * Injectable event backend
181
180
  */
@@ -249,14 +248,12 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
249
248
  ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
250
249
  }
251
250
  } else if (dependency === 'topScroll') {
252
-
253
251
  if (isEventSupported('scroll', true)) {
254
252
  ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
255
253
  } else {
256
254
  ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
257
255
  }
258
256
  } else if (dependency === 'topFocus' || dependency === 'topBlur') {
259
-
260
257
  if (isEventSupported('focus', true)) {
261
258
  ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
262
259
  ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
@@ -321,7 +318,6 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
321
318
  isMonitoringScrollValue = true;
322
319
  }
323
320
  }
324
-
325
321
  });
326
322
 
327
323
  module.exports = ReactBrowserEventEmitter;
@@ -30,7 +30,6 @@ var createReifiedYield = ReactReifiedYield.createReifiedYield;
30
30
  var isArray = Array.isArray;
31
31
 
32
32
  function ChildReconciler(shouldClone) {
33
-
34
33
  function createSubsequentChild(returnFiber, existingChild, previousSibling, newChildren, priority) {
35
34
  if (typeof newChildren !== 'object' || newChildren === null) {
36
35
  return previousSibling;
@@ -59,8 +59,8 @@ var ReactChildReconciler = {
59
59
  * @return {?object} A set of child instances.
60
60
  * @internal
61
61
  */
62
- instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
63
- ) {
62
+ instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
63
+ {
64
64
  if (nestedChildNodes == null) {
65
65
  return null;
66
66
  }
@@ -86,8 +86,8 @@ var ReactChildReconciler = {
86
86
  * @return {?object} A new set of child instances.
87
87
  * @internal
88
88
  */
89
- updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
90
- ) {
89
+ updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
90
+ {
91
91
  // We currently don't have a way to track moves here but if we use iterators
92
92
  // instead of for..in we can zip the iterators and check if an item has
93
93
  // moved.
@@ -147,7 +147,6 @@ var ReactChildReconciler = {
147
147
  }
148
148
  }
149
149
  }
150
-
151
150
  };
152
151
 
153
152
  module.exports = ReactChildReconciler;
@@ -19,11 +19,9 @@ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
19
19
  * need for this injection.
20
20
  */
21
21
  var ReactComponentBrowserEnvironment = {
22
-
23
22
  processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
24
23
 
25
24
  replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
26
-
27
25
  };
28
26
 
29
27
  module.exports = ReactComponentBrowserEnvironment;
@@ -18,7 +18,6 @@ var invariant = require('fbjs/lib/invariant');
18
18
  var injected = false;
19
19
 
20
20
  var ReactComponentEnvironment = {
21
-
22
21
  /**
23
22
  * Optionally injectable hook for swapping out mount images in the middle of
24
23
  * the tree.
@@ -39,7 +38,6 @@ var ReactComponentEnvironment = {
39
38
  injected = true;
40
39
  }
41
40
  }
42
-
43
41
  };
44
42
 
45
43
  module.exports = ReactComponentEnvironment;
@@ -117,7 +117,6 @@ var nextMountID = 1;
117
117
  * @lends {ReactCompositeComponent.prototype}
118
118
  */
119
119
  var ReactCompositeComponent = {
120
-
121
120
  /**
122
121
  * Base constructor for all composite component.
123
122
  *
@@ -213,7 +212,7 @@ var ReactCompositeComponent = {
213
212
  var propsMutated = inst.props !== publicProps;
214
213
  var componentName = Component.displayName || Component.name || 'Component';
215
214
 
216
- process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
215
+ process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0;
217
216
  }
218
217
 
219
218
  // These should be set up in the constructor, but as a convenience for
@@ -895,7 +894,6 @@ var ReactCompositeComponent = {
895
894
 
896
895
  // Stub
897
896
  _instantiateReactComponent: null
898
-
899
897
  };
900
898
 
901
899
  module.exports = ReactCompositeComponent;
package/lib/ReactDOM.js CHANGED
@@ -35,6 +35,7 @@ var ReactDOM = {
35
35
  /* eslint-disable camelcase */
36
36
  unstable_batchedUpdates: ReactUpdates.batchedUpdates,
37
37
  unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
38
+ /* eslint-enable camelcase */
38
39
  };
39
40
 
40
41
  // Inject the runtime into a devtools global hook regardless of browser.
@@ -63,7 +64,6 @@ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVT
63
64
  if (process.env.NODE_ENV !== 'production') {
64
65
  var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
65
66
  if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
66
-
67
67
  // First check if devtools is not installed
68
68
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
69
69
  // If we're in Chrome or Firefox, provide a download link if not installed.
@@ -75,7 +75,7 @@ if (process.env.NODE_ENV !== 'production') {
75
75
  }
76
76
 
77
77
  var testFunc = function testFn() {};
78
- process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
78
+ process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
79
79
 
80
80
  // If we're in IE8, check to see if we are in compatibility mode and provide
81
81
  // information on preventing compatibility mode