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.
- package/dist/react-dom-server.js +722 -604
- package/dist/react-dom-server.min.js +5 -5
- package/dist/react-dom.js +849 -659
- package/dist/react-dom.min.js +6 -5
- package/lib/BeforeInputEventPlugin.js +0 -1
- package/lib/CSSProperty.js +6 -0
- package/lib/CSSPropertyOperations.js +14 -8
- package/lib/ChangeEventPlugin.js +49 -83
- package/lib/DOMChildrenOperations.js +4 -3
- package/lib/DOMProperty.js +0 -1
- package/lib/DOMPropertyOperations.js +0 -2
- package/lib/Danger.js +0 -2
- package/lib/EnterLeaveEventPlugin.js +0 -2
- package/lib/EventPluginHub.js +0 -4
- package/lib/EventPluginRegistry.js +0 -2
- package/lib/LinkedValueUtils.js +7 -7
- package/lib/ReactBrowserEventEmitter.js +0 -4
- package/lib/ReactChildFiber.js +0 -1
- package/lib/ReactChildReconciler.js +4 -5
- package/lib/ReactComponentBrowserEnvironment.js +0 -2
- package/lib/ReactComponentEnvironment.js +0 -2
- package/lib/ReactCompositeComponent.js +1 -3
- package/lib/ReactDOM.js +2 -2
- package/lib/ReactDOMComponent.js +33 -24
- package/lib/ReactDOMFiber.js +0 -1
- package/lib/ReactDOMIDOperations.js +0 -1
- package/lib/ReactDOMInput.js +5 -3
- package/lib/ReactDOMOption.js +0 -1
- package/lib/ReactDOMTextComponent.js +0 -2
- package/lib/ReactDebugTool.js +3 -1
- package/lib/ReactEventEmitterMixin.js +0 -1
- package/lib/ReactFiber.js +0 -2
- package/lib/ReactFiberBeginWork.js +0 -1
- package/lib/ReactFiberCommitWork.js +0 -1
- package/lib/ReactFiberCompleteWork.js +0 -2
- package/lib/ReactInputSelection.js +0 -1
- package/lib/ReactInstanceMap.js +0 -2
- package/lib/ReactMount.js +7 -7
- package/lib/ReactMultiChild.js +0 -4
- package/lib/ReactOwner.js +0 -1
- package/lib/ReactPerf.js +6 -6
- package/lib/ReactPriorityLevel.js +2 -1
- package/lib/ReactReconciler.js +2 -4
- package/lib/ReactShallowRenderer.js +6 -0
- package/lib/ReactSimpleEmptyComponent.js +2 -2
- package/lib/ReactTestUtils.js +1 -0
- package/lib/ReactUpdateQueue.js +1 -3
- package/lib/ReactVersion.js +1 -1
- package/lib/ResponderEventPlugin.js +0 -2
- package/lib/SelectEventPlugin.js +0 -3
- package/lib/SimpleEventPlugin.js +0 -2
- package/lib/SyntheticEvent.js +4 -6
- package/lib/SyntheticWheelEvent.js +3 -6
- package/lib/TapEventPlugin.js +0 -2
- package/lib/Transaction.js +3 -0
- package/lib/ViewportMetrics.js +0 -2
- package/lib/dangerousStyleValue.js +2 -2
- package/lib/deprecated.js +3 -3
- package/lib/escapeTextContentForBrowser.js +0 -1
- package/lib/getEventKey.js +24 -14
- package/lib/getEventModifierState.js +4 -4
- package/lib/inputValueTracking.js +122 -0
- package/lib/instantiateReactComponent.js +1 -1
- package/lib/isTextInputElement.js +14 -14
- package/lib/lowPriorityWarning.js +64 -0
- package/lib/setInnerHTML.js +1 -1
- package/lib/traverseAllChildren.js +1 -1
- package/lib/validateDOMNesting.js +1 -7
- package/package.json +3 -3
|
@@ -18,15 +18,12 @@ var SyntheticMouseEvent = require('./SyntheticMouseEvent');
|
|
|
18
18
|
*/
|
|
19
19
|
var WheelEventInterface = {
|
|
20
20
|
deltaX: function (event) {
|
|
21
|
-
return 'deltaX' in event ? event.deltaX :
|
|
22
|
-
// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
|
|
21
|
+
return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
|
|
23
22
|
'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
|
24
23
|
},
|
|
25
24
|
deltaY: function (event) {
|
|
26
|
-
return 'deltaY' in event ? event.deltaY :
|
|
27
|
-
// Fallback to `
|
|
28
|
-
'wheelDeltaY' in event ? -event.wheelDeltaY :
|
|
29
|
-
// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
|
|
25
|
+
return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
|
|
26
|
+
'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
|
|
30
27
|
'wheelDelta' in event ? -event.wheelDelta : 0;
|
|
31
28
|
},
|
|
32
29
|
deltaZ: null,
|
package/lib/TapEventPlugin.js
CHANGED
|
@@ -74,7 +74,6 @@ var usedTouchTime = 0;
|
|
|
74
74
|
var TOUCH_DELAY = 1000;
|
|
75
75
|
|
|
76
76
|
var TapEventPlugin = {
|
|
77
|
-
|
|
78
77
|
tapMoveThreshold: tapMoveThreshold,
|
|
79
78
|
|
|
80
79
|
eventTypes: eventTypes,
|
|
@@ -109,7 +108,6 @@ var TapEventPlugin = {
|
|
|
109
108
|
EventPropagators.accumulateTwoPhaseDispatches(event);
|
|
110
109
|
return event;
|
|
111
110
|
}
|
|
112
|
-
|
|
113
111
|
};
|
|
114
112
|
|
|
115
113
|
module.exports = TapEventPlugin;
|
package/lib/Transaction.js
CHANGED
|
@@ -108,6 +108,8 @@ var TransactionImpl = {
|
|
|
108
108
|
return !!this._isInTransaction;
|
|
109
109
|
},
|
|
110
110
|
|
|
111
|
+
/* eslint-disable space-before-function-paren */
|
|
112
|
+
|
|
111
113
|
/**
|
|
112
114
|
* Executes the function within a safety window. Use this for the top level
|
|
113
115
|
* methods that result in large amounts of computation/mutations that would
|
|
@@ -126,6 +128,7 @@ var TransactionImpl = {
|
|
|
126
128
|
* @return {*} Return value from `method`.
|
|
127
129
|
*/
|
|
128
130
|
perform: function (method, scope, a, b, c, d, e, f) {
|
|
131
|
+
/* eslint-enable space-before-function-paren */
|
|
129
132
|
!!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
|
|
130
133
|
var errorThrown;
|
|
131
134
|
var ret;
|
package/lib/ViewportMetrics.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
var ViewportMetrics = {
|
|
14
|
-
|
|
15
14
|
currentScrollLeft: 0,
|
|
16
15
|
|
|
17
16
|
currentScrollTop: 0,
|
|
@@ -20,7 +19,6 @@ var ViewportMetrics = {
|
|
|
20
19
|
ViewportMetrics.currentScrollLeft = scrollPosition.x;
|
|
21
20
|
ViewportMetrics.currentScrollTop = scrollPosition.y;
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
};
|
|
25
23
|
|
|
26
24
|
module.exports = ViewportMetrics;
|
|
@@ -26,7 +26,7 @@ var styleWarnings = {};
|
|
|
26
26
|
* @param {ReactDOMComponent} component
|
|
27
27
|
* @return {string} Normalized style value with dimensions applied.
|
|
28
28
|
*/
|
|
29
|
-
function dangerousStyleValue(name, value, component) {
|
|
29
|
+
function dangerousStyleValue(name, value, component, isCustomProperty) {
|
|
30
30
|
// Note that we've removed escapeTextForBrowser() calls here since the
|
|
31
31
|
// whole string will be escaped when the attribute is injected into
|
|
32
32
|
// the markup. If you provide unsafe user data here they can inject
|
|
@@ -43,7 +43,7 @@ function dangerousStyleValue(name, value, component) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
var isNonNumeric = isNaN(value);
|
|
46
|
-
if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
|
46
|
+
if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
|
47
47
|
return '' + value; // cast to string
|
|
48
48
|
}
|
|
49
49
|
|
package/lib/deprecated.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
var _assign = require('object-assign');
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var lowPriorityWarning = require('./lowPriorityWarning');
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* This will log a single deprecation notice per function and forward the call
|
|
@@ -30,12 +30,12 @@ function deprecated(fnName, newModule, newPackage, ctx, fn) {
|
|
|
30
30
|
var warned = false;
|
|
31
31
|
if (process.env.NODE_ENV !== 'production') {
|
|
32
32
|
var newFn = function () {
|
|
33
|
-
|
|
33
|
+
lowPriorityWarning(warned,
|
|
34
34
|
/* eslint-disable no-useless-concat */
|
|
35
35
|
// Require examples in this string must be split to prevent React's
|
|
36
36
|
// build tools from mistaking them for real requires.
|
|
37
37
|
// Otherwise the build tools will attempt to build a '%s' module.
|
|
38
|
-
'React.%s is deprecated. Please use %s.%s from require' +
|
|
38
|
+
'React.%s is deprecated. Please use %s.%s from require' + "('%s') " + 'instead.', fnName, newModule, fnName, newPackage);
|
|
39
39
|
/* eslint-enable no-useless-concat */
|
|
40
40
|
warned = true;
|
|
41
41
|
return fn.apply(ctx, arguments);
|
package/lib/getEventKey.js
CHANGED
|
@@ -17,18 +17,18 @@ var getEventCharCode = require('./getEventCharCode');
|
|
|
17
17
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
|
|
18
18
|
*/
|
|
19
19
|
var normalizeKey = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
Esc: 'Escape',
|
|
21
|
+
Spacebar: ' ',
|
|
22
|
+
Left: 'ArrowLeft',
|
|
23
|
+
Up: 'ArrowUp',
|
|
24
|
+
Right: 'ArrowRight',
|
|
25
|
+
Down: 'ArrowDown',
|
|
26
|
+
Del: 'Delete',
|
|
27
|
+
Win: 'OS',
|
|
28
|
+
Menu: 'ContextMenu',
|
|
29
|
+
Apps: 'ContextMenu',
|
|
30
|
+
Scroll: 'ScrollLock',
|
|
31
|
+
MozPrintableKey: 'Unidentified'
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -58,8 +58,18 @@ var translateToKey = {
|
|
|
58
58
|
40: 'ArrowDown',
|
|
59
59
|
45: 'Insert',
|
|
60
60
|
46: 'Delete',
|
|
61
|
-
112: 'F1',
|
|
62
|
-
|
|
61
|
+
112: 'F1',
|
|
62
|
+
113: 'F2',
|
|
63
|
+
114: 'F3',
|
|
64
|
+
115: 'F4',
|
|
65
|
+
116: 'F5',
|
|
66
|
+
117: 'F6',
|
|
67
|
+
118: 'F7',
|
|
68
|
+
119: 'F8',
|
|
69
|
+
120: 'F9',
|
|
70
|
+
121: 'F10',
|
|
71
|
+
122: 'F11',
|
|
72
|
+
123: 'F12',
|
|
63
73
|
144: 'NumLock',
|
|
64
74
|
145: 'ScrollLock',
|
|
65
75
|
224: 'Meta'
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
var modifierKeyToProp = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Alt: 'altKey',
|
|
20
|
+
Control: 'ctrlKey',
|
|
21
|
+
Meta: 'metaKey',
|
|
22
|
+
Shift: 'shiftKey'
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
// IE8 does not implement getModifierState so we simply map it to the only
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
var ReactDOMComponentTree = require('./ReactDOMComponentTree');
|
|
14
|
+
|
|
15
|
+
function isCheckable(elem) {
|
|
16
|
+
var type = elem.type;
|
|
17
|
+
var nodeName = elem.nodeName;
|
|
18
|
+
return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getTracker(inst) {
|
|
22
|
+
return inst._wrapperState.valueTracker;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function attachTracker(inst, tracker) {
|
|
26
|
+
inst._wrapperState.valueTracker = tracker;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function detachTracker(inst) {
|
|
30
|
+
delete inst._wrapperState.valueTracker;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function getValueFromNode(node) {
|
|
34
|
+
var value;
|
|
35
|
+
if (node) {
|
|
36
|
+
value = isCheckable(node) ? '' + node.checked : node.value;
|
|
37
|
+
}
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var inputValueTracking = {
|
|
42
|
+
// exposed for testing
|
|
43
|
+
_getTrackerFromNode: function (node) {
|
|
44
|
+
return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
track: function (inst) {
|
|
49
|
+
if (getTracker(inst)) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
|
54
|
+
var valueField = isCheckable(node) ? 'checked' : 'value';
|
|
55
|
+
var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
|
|
56
|
+
|
|
57
|
+
var currentValue = '' + node[valueField];
|
|
58
|
+
|
|
59
|
+
// if someone has already defined a value or Safari, then bail
|
|
60
|
+
// and don't track value will cause over reporting of changes,
|
|
61
|
+
// but it's better then a hard failure
|
|
62
|
+
// (needed for certain tests that spyOn input values and Safari)
|
|
63
|
+
if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Object.defineProperty(node, valueField, {
|
|
68
|
+
enumerable: descriptor.enumerable,
|
|
69
|
+
configurable: true,
|
|
70
|
+
get: function () {
|
|
71
|
+
return descriptor.get.call(this);
|
|
72
|
+
},
|
|
73
|
+
set: function (value) {
|
|
74
|
+
currentValue = '' + value;
|
|
75
|
+
descriptor.set.call(this, value);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
attachTracker(inst, {
|
|
80
|
+
getValue: function () {
|
|
81
|
+
return currentValue;
|
|
82
|
+
},
|
|
83
|
+
setValue: function (value) {
|
|
84
|
+
currentValue = '' + value;
|
|
85
|
+
},
|
|
86
|
+
stopTracking: function () {
|
|
87
|
+
detachTracker(inst);
|
|
88
|
+
delete node[valueField];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
updateValueIfChanged: function (inst) {
|
|
94
|
+
if (!inst) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
var tracker = getTracker(inst);
|
|
98
|
+
|
|
99
|
+
if (!tracker) {
|
|
100
|
+
inputValueTracking.track(inst);
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
var lastValue = tracker.getValue();
|
|
105
|
+
var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
|
|
106
|
+
|
|
107
|
+
if (nextValue !== lastValue) {
|
|
108
|
+
tracker.setValue(nextValue);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return false;
|
|
113
|
+
},
|
|
114
|
+
stopTracking: function (inst) {
|
|
115
|
+
var tracker = getTracker(inst);
|
|
116
|
+
if (tracker) {
|
|
117
|
+
tracker.stopTracking();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
module.exports = inputValueTracking;
|
|
@@ -67,7 +67,7 @@ function instantiateReactComponent(node, shouldHaveDebugID) {
|
|
|
67
67
|
var info = '';
|
|
68
68
|
if (process.env.NODE_ENV !== 'production') {
|
|
69
69
|
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
70
|
-
info += ' You likely forgot to export your component from the file ' +
|
|
70
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
info += getDeclarationErrorAddendum(element._owner);
|
|
@@ -16,21 +16,21 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
var supportedInputTypes = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
color: true,
|
|
20
|
+
date: true,
|
|
21
|
+
datetime: true,
|
|
22
22
|
'datetime-local': true,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
email: true,
|
|
24
|
+
month: true,
|
|
25
|
+
number: true,
|
|
26
|
+
password: true,
|
|
27
|
+
range: true,
|
|
28
|
+
search: true,
|
|
29
|
+
tel: true,
|
|
30
|
+
text: true,
|
|
31
|
+
time: true,
|
|
32
|
+
url: true,
|
|
33
|
+
week: true
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
function isTextInputElement(elem) {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-2015, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Forked from fbjs/warning:
|
|
15
|
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
16
|
+
*
|
|
17
|
+
* Only change is we use console.warn instead of console.error,
|
|
18
|
+
* and do nothing when 'console' is not supported.
|
|
19
|
+
* This really simplifies the code.
|
|
20
|
+
* ---
|
|
21
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
22
|
+
* This can be used to log issues in development environments in critical
|
|
23
|
+
* paths. Removing the logging code for production environments will keep the
|
|
24
|
+
* same logic and follow the same code paths.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
var lowPriorityWarning = function () {};
|
|
28
|
+
|
|
29
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
30
|
+
var printWarning = function (format) {
|
|
31
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
32
|
+
args[_key - 1] = arguments[_key];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var argIndex = 0;
|
|
36
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
37
|
+
return args[argIndex++];
|
|
38
|
+
});
|
|
39
|
+
if (typeof console !== 'undefined') {
|
|
40
|
+
console.warn(message);
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
// --- Welcome to debugging React ---
|
|
44
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
45
|
+
// to find the callsite that caused this warning to fire.
|
|
46
|
+
throw new Error(message);
|
|
47
|
+
} catch (x) {}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
lowPriorityWarning = function (condition, format) {
|
|
51
|
+
if (format === undefined) {
|
|
52
|
+
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
53
|
+
}
|
|
54
|
+
if (!condition) {
|
|
55
|
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
56
|
+
args[_key2 - 2] = arguments[_key2];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
printWarning.apply(undefined, [format].concat(args));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
module.exports = lowPriorityWarning;
|
package/lib/setInnerHTML.js
CHANGED
|
@@ -76,7 +76,7 @@ if (ExecutionEnvironment.canUseDOM) {
|
|
|
76
76
|
// in hopes that this is preserved even if "\uFEFF" is transformed to
|
|
77
77
|
// the actual Unicode character (by Babel, for example).
|
|
78
78
|
// https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
|
|
79
|
-
node.innerHTML = String.fromCharCode(
|
|
79
|
+
node.innerHTML = String.fromCharCode(0xfeff) + html;
|
|
80
80
|
|
|
81
81
|
// deleteData leaves an empty `TextNode` which offsets the index of all
|
|
82
82
|
// children. Definitely want to avoid this.
|
|
@@ -131,7 +131,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
131
131
|
if (process.env.NODE_ENV !== 'production') {
|
|
132
132
|
addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
|
133
133
|
if (children._isReactElement) {
|
|
134
|
-
addendum =
|
|
134
|
+
addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
|
|
135
135
|
}
|
|
136
136
|
if (ReactCurrentOwner.current) {
|
|
137
137
|
var name = ReactCurrentOwner.current.getName();
|
|
@@ -121,7 +121,6 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
121
121
|
// but
|
|
122
122
|
case 'option':
|
|
123
123
|
return tag === '#text';
|
|
124
|
-
|
|
125
124
|
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
|
|
126
125
|
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
|
|
127
126
|
// No special behavior since these rules fall back to "in body" mode for
|
|
@@ -130,25 +129,20 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
130
129
|
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
|
|
131
130
|
case 'tr':
|
|
132
131
|
return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
|
|
133
|
-
|
|
134
132
|
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
|
|
135
133
|
case 'tbody':
|
|
136
134
|
case 'thead':
|
|
137
135
|
case 'tfoot':
|
|
138
136
|
return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
|
|
139
|
-
|
|
140
137
|
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
|
|
141
138
|
case 'colgroup':
|
|
142
139
|
return tag === 'col' || tag === 'template';
|
|
143
|
-
|
|
144
140
|
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
|
|
145
141
|
case 'table':
|
|
146
142
|
return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
|
|
147
|
-
|
|
148
143
|
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
|
|
149
144
|
case 'head':
|
|
150
145
|
return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
|
|
151
|
-
|
|
152
146
|
// https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
|
|
153
147
|
case 'html':
|
|
154
148
|
return tag === 'head' || tag === 'body';
|
|
@@ -344,7 +338,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
344
338
|
tagDisplayName = 'Text nodes';
|
|
345
339
|
} else {
|
|
346
340
|
tagDisplayName = 'Whitespace text nodes';
|
|
347
|
-
whitespaceInfo =
|
|
341
|
+
whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
|
|
348
342
|
}
|
|
349
343
|
} else {
|
|
350
344
|
tagDisplayName = '<' + childTag + '>';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dom",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.6.1",
|
|
4
4
|
"description": "React package for working with the DOM.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "facebook/react",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"fbjs": "^0.8.9",
|
|
17
17
|
"loose-envify": "^1.1.0",
|
|
18
18
|
"object-assign": "^4.1.0",
|
|
19
|
-
"prop-types": "
|
|
19
|
+
"prop-types": "^15.5.10"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"react": "^15.
|
|
22
|
+
"react": "^15.6.1"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"LICENSE",
|