react 0.13.0-alpha.1 → 0.13.0-rc1
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/JSXTransformer.js +1376 -596
- package/dist/react-with-addons.js +3256 -2363
- package/dist/react-with-addons.min.js +7 -7
- package/dist/react.js +3092 -2266
- package/dist/react.min.js +6 -7
- package/lib/AutoFocusMixin.js +2 -2
- package/lib/BeforeInputEventPlugin.js +5 -9
- package/lib/CSSCore.js +1 -1
- package/lib/CSSProperty.js +4 -2
- package/lib/CSSPropertyOperations.js +44 -17
- package/lib/CallbackQueue.js +3 -3
- package/lib/ChangeEventPlugin.js +2 -2
- package/lib/ClientReactRootIndex.js +2 -2
- package/lib/DOMChildrenOperations.js +10 -47
- package/lib/DOMProperty.js +2 -2
- package/lib/DOMPropertyOperations.js +11 -16
- package/lib/Danger.js +7 -6
- package/lib/DefaultEventPluginOrder.js +3 -3
- package/lib/EnterLeaveEventPlugin.js +2 -2
- package/lib/EventConstants.js +2 -2
- package/lib/EventListener.js +1 -1
- package/lib/EventPluginHub.js +10 -8
- package/lib/EventPluginRegistry.js +2 -2
- package/lib/EventPluginUtils.js +4 -4
- package/lib/EventPropagators.js +2 -2
- package/lib/ExecutionEnvironment.js +1 -1
- package/lib/FallbackCompositionState.js +7 -5
- package/lib/HTMLDOMPropertyConfig.js +22 -10
- package/lib/LinkedStateMixin.js +2 -2
- package/lib/LinkedValueUtils.js +4 -4
- package/lib/LocalEventTrapMixin.js +10 -3
- package/lib/MobileSafariClickEventPlugin.js +2 -2
- package/lib/Object.assign.js +2 -2
- package/lib/PooledClass.js +2 -2
- package/lib/React.js +9 -13
- package/lib/ReactBrowserComponentMixin.js +2 -2
- package/lib/ReactBrowserEventEmitter.js +4 -4
- package/lib/ReactCSSTransitionGroup.js +2 -2
- package/lib/ReactCSSTransitionGroupChild.js +12 -7
- package/lib/ReactChildReconciler.js +11 -7
- package/lib/ReactChildren.js +13 -10
- package/lib/ReactClass.js +161 -135
- package/lib/ReactComponent.js +100 -158
- package/lib/ReactComponentBrowserEnvironment.js +2 -2
- package/lib/ReactComponentEnvironment.js +3 -3
- package/lib/ReactComponentWithPureRenderMixin.js +2 -2
- package/lib/ReactCompositeComponent.js +336 -484
- package/lib/ReactContext.js +14 -4
- package/lib/ReactCurrentOwner.js +2 -2
- package/lib/ReactDOM.js +2 -2
- package/lib/ReactDOMButton.js +2 -2
- package/lib/ReactDOMComponent.js +42 -52
- package/lib/ReactDOMForm.js +2 -2
- package/lib/ReactDOMIDOperations.js +4 -4
- package/lib/ReactDOMIframe.js +43 -0
- package/lib/ReactDOMImg.js +2 -2
- package/lib/ReactDOMInput.js +2 -2
- package/lib/ReactDOMOption.js +2 -2
- package/lib/ReactDOMSelect.js +3 -3
- package/lib/ReactDOMSelection.js +2 -2
- package/lib/ReactDOMTextComponent.js +4 -13
- package/lib/ReactDOMTextarea.js +2 -2
- package/lib/ReactDefaultBatchingStrategy.js +5 -5
- package/lib/ReactDefaultInjection.js +26 -2
- package/lib/ReactDefaultPerf.js +12 -4
- package/lib/ReactDefaultPerfAnalysis.js +1 -1
- package/lib/ReactElement.js +7 -5
- package/lib/ReactElementValidator.js +185 -65
- package/lib/ReactEmptyComponent.js +17 -6
- package/lib/ReactErrorUtils.js +1 -1
- package/lib/ReactEventEmitterMixin.js +2 -2
- package/lib/ReactEventListener.js +4 -5
- package/lib/ReactFragment.js +180 -0
- package/lib/ReactInjection.js +2 -2
- package/lib/ReactInputSelection.js +2 -2
- package/lib/ReactInstanceHandles.js +4 -3
- package/lib/ReactInstanceMap.js +2 -2
- package/lib/ReactLifeCycle.js +35 -0
- package/lib/ReactLink.js +2 -2
- package/lib/ReactMarkupChecksum.js +2 -2
- package/lib/ReactMount.js +87 -23
- package/lib/ReactMultiChild.js +19 -7
- package/lib/ReactMultiChildUpdateTypes.js +2 -2
- package/lib/ReactNativeComponent.js +34 -37
- package/lib/ReactOwner.js +2 -2
- package/lib/ReactPerf.js +2 -2
- package/lib/ReactPropTransferer.js +3 -3
- package/lib/ReactPropTypeLocationNames.js +2 -2
- package/lib/ReactPropTypeLocations.js +2 -2
- package/lib/ReactPropTypes.js +16 -8
- package/lib/ReactPutListenerQueue.js +2 -2
- package/lib/ReactReconcileTransaction.js +2 -2
- package/lib/ReactReconciler.js +121 -0
- package/lib/ReactRef.js +41 -68
- package/lib/ReactRootIndex.js +2 -2
- package/lib/ReactServerRendering.js +4 -3
- package/lib/ReactServerRenderingTransaction.js +2 -2
- package/lib/ReactStateSetters.js +2 -2
- package/lib/ReactTestUtils.js +49 -8
- package/lib/ReactTransitionChildMapping.js +8 -4
- package/lib/ReactTransitionEvents.js +2 -2
- package/lib/ReactTransitionGroup.js +6 -6
- package/lib/ReactUpdateQueue.js +295 -0
- package/lib/ReactUpdates.js +13 -22
- package/lib/ReactWithAddons.js +4 -2
- package/lib/SVGDOMPropertyConfig.js +2 -2
- package/lib/SelectEventPlugin.js +4 -4
- package/lib/ServerReactRootIndex.js +2 -2
- package/lib/SimpleEventPlugin.js +4 -4
- package/lib/SyntheticClipboardEvent.js +2 -3
- package/lib/SyntheticCompositionEvent.js +2 -3
- package/lib/SyntheticDragEvent.js +2 -2
- package/lib/SyntheticEvent.js +12 -4
- package/lib/SyntheticFocusEvent.js +2 -2
- package/lib/SyntheticInputEvent.js +2 -3
- package/lib/SyntheticKeyboardEvent.js +2 -2
- package/lib/SyntheticMouseEvent.js +2 -2
- package/lib/SyntheticTouchEvent.js +2 -2
- package/lib/SyntheticUIEvent.js +2 -2
- package/lib/SyntheticWheelEvent.js +2 -2
- package/lib/Transaction.js +5 -5
- package/lib/ViewportMetrics.js +2 -2
- package/lib/accumulateInto.js +2 -2
- package/lib/adler32.js +2 -2
- package/lib/camelize.js +1 -1
- package/lib/camelizeStyleName.js +1 -1
- package/lib/cloneWithProps.js +4 -4
- package/lib/containsNode.js +1 -1
- package/lib/{createArrayFrom.js → createArrayFromMixed.js} +6 -6
- package/lib/createFullPageComponent.js +2 -2
- package/lib/createNodesFromMarkup.js +4 -4
- package/lib/cx.js +16 -1
- package/lib/dangerousStyleValue.js +2 -2
- package/lib/emptyFunction.js +1 -1
- package/lib/emptyObject.js +1 -1
- package/lib/{escapeTextForBrowser.js → escapeTextContentForBrowser.js} +10 -11
- package/lib/findDOMNode.js +26 -9
- package/lib/flattenChildren.js +11 -9
- package/lib/focusNode.js +1 -1
- package/lib/forEachAccumulated.js +2 -2
- package/lib/getActiveElement.js +1 -1
- package/lib/getEventCharCode.js +2 -2
- package/lib/getEventKey.js +2 -2
- package/lib/getEventModifierState.js +2 -2
- package/lib/getEventTarget.js +2 -2
- package/lib/getIteratorFn.js +2 -2
- package/lib/getMarkupWrap.js +1 -1
- package/lib/getNodeForCharacterOffset.js +3 -3
- package/lib/getReactRootElementInContainer.js +2 -2
- package/lib/getTextContentAccessor.js +2 -2
- package/lib/getUnboundedScrollPosition.js +1 -1
- package/lib/hyphenate.js +1 -1
- package/lib/hyphenateStyleName.js +1 -1
- package/lib/instantiateReactComponent.js +21 -21
- package/lib/invariant.js +1 -1
- package/lib/isEventSupported.js +2 -2
- package/lib/isNode.js +1 -1
- package/lib/isTextInputElement.js +2 -2
- package/lib/isTextNode.js +1 -1
- package/lib/joinClasses.js +2 -2
- package/lib/keyMirror.js +2 -2
- package/lib/keyOf.js +1 -1
- package/lib/mapObject.js +1 -1
- package/lib/memoizeStringOnly.js +5 -6
- package/lib/onlyChild.js +2 -2
- package/lib/performance.js +1 -1
- package/lib/performanceNow.js +1 -1
- package/lib/quoteAttributeValueForBrowser.js +26 -0
- package/lib/setInnerHTML.js +13 -2
- package/lib/setTextContent.js +40 -0
- package/lib/shallowEqual.js +2 -2
- package/lib/shouldUpdateReactComponent.js +64 -8
- package/lib/toArray.js +2 -2
- package/lib/traverseAllChildren.js +19 -5
- package/lib/update.js +2 -2
- package/lib/warning.js +20 -2
- package/package.json +1 -1
- package/lib/accumulate.js +0 -47
- package/lib/copyProperties.js +0 -56
- package/lib/merge.js +0 -34
- package/lib/mergeInto.js +0 -24
- package/lib/monitorCodeUse.js +0 -30
package/lib/ReactContext.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
* @providesModule ReactContext
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var assign = require("./Object.assign");
|
|
15
15
|
var emptyObject = require("./emptyObject");
|
|
16
|
-
var
|
|
16
|
+
var warning = require("./warning");
|
|
17
|
+
|
|
18
|
+
var didWarn = false;
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* Keeps track of the current context.
|
|
@@ -46,7 +48,15 @@ var ReactContext = {
|
|
|
46
48
|
* @return {ReactComponent|array<ReactComponent>}
|
|
47
49
|
*/
|
|
48
50
|
withContext: function(newContext, scopedCallback) {
|
|
49
|
-
|
|
51
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
52
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
53
|
+
didWarn,
|
|
54
|
+
'withContext is deprecated and will be removed in a future version. ' +
|
|
55
|
+
'Use a wrapper component with getChildContext instead.'
|
|
56
|
+
) : null);
|
|
57
|
+
|
|
58
|
+
didWarn = true;
|
|
59
|
+
}
|
|
50
60
|
|
|
51
61
|
var result;
|
|
52
62
|
var previousContext = ReactContext.current;
|
package/lib/ReactCurrentOwner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactCurrentOwner
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Keeps track of the current owner.
|
package/lib/ReactDOM.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @typechecks static-only
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
'use strict';
|
|
14
14
|
|
|
15
15
|
var ReactElement = require("./ReactElement");
|
|
16
16
|
var ReactElementValidator = require("./ReactElementValidator");
|
package/lib/ReactDOMButton.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactDOMButton
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var AutoFocusMixin = require("./AutoFocusMixin");
|
|
15
15
|
var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");
|
package/lib/ReactDOMComponent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -10,23 +10,26 @@
|
|
|
10
10
|
* @typechecks static-only
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/* global hasOwnProperty:true */
|
|
14
|
+
|
|
15
|
+
'use strict';
|
|
14
16
|
|
|
15
17
|
var CSSPropertyOperations = require("./CSSPropertyOperations");
|
|
16
18
|
var DOMProperty = require("./DOMProperty");
|
|
17
19
|
var DOMPropertyOperations = require("./DOMPropertyOperations");
|
|
18
|
-
var ReactComponent = require("./ReactComponent");
|
|
19
20
|
var ReactBrowserEventEmitter = require("./ReactBrowserEventEmitter");
|
|
21
|
+
var ReactComponentBrowserEnvironment =
|
|
22
|
+
require("./ReactComponentBrowserEnvironment");
|
|
20
23
|
var ReactMount = require("./ReactMount");
|
|
21
24
|
var ReactMultiChild = require("./ReactMultiChild");
|
|
22
25
|
var ReactPerf = require("./ReactPerf");
|
|
23
26
|
|
|
24
27
|
var assign = require("./Object.assign");
|
|
25
|
-
var
|
|
28
|
+
var escapeTextContentForBrowser = require("./escapeTextContentForBrowser");
|
|
26
29
|
var invariant = require("./invariant");
|
|
27
30
|
var isEventSupported = require("./isEventSupported");
|
|
28
31
|
var keyOf = require("./keyOf");
|
|
29
|
-
var
|
|
32
|
+
var warning = require("./warning");
|
|
30
33
|
|
|
31
34
|
var deleteListener = ReactBrowserEventEmitter.deleteListener;
|
|
32
35
|
var listenTo = ReactBrowserEventEmitter.listenTo;
|
|
@@ -52,19 +55,31 @@ function assertValidProps(props) {
|
|
|
52
55
|
return;
|
|
53
56
|
}
|
|
54
57
|
// Note the use of `==` which checks for null or undefined.
|
|
55
|
-
(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
if (props.dangerouslySetInnerHTML != null) {
|
|
59
|
+
("production" !== process.env.NODE_ENV ? invariant(
|
|
60
|
+
props.children == null,
|
|
61
|
+
'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'
|
|
62
|
+
) : invariant(props.children == null));
|
|
63
|
+
("production" !== process.env.NODE_ENV ? invariant(
|
|
64
|
+
props.dangerouslySetInnerHTML.__html != null,
|
|
65
|
+
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
|
|
66
|
+
'Please visit http://fb.me/react-invariant-dangerously-set-inner-html ' +
|
|
67
|
+
'for more information.'
|
|
68
|
+
) : invariant(props.dangerouslySetInnerHTML.__html != null));
|
|
69
|
+
}
|
|
59
70
|
if ("production" !== process.env.NODE_ENV) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
72
|
+
props.innerHTML == null,
|
|
73
|
+
'Directly setting property `innerHTML` is not permitted. ' +
|
|
74
|
+
'For more information, lookup documentation on `dangerouslySetInnerHTML`.'
|
|
75
|
+
) : null);
|
|
76
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
77
|
+
!props.contentEditable || props.children == null,
|
|
78
|
+
'A component is `contentEditable` and contains `children` managed by ' +
|
|
79
|
+
'React. It is now your responsibility to guarantee that none of ' +
|
|
80
|
+
'those nodes are unexpectedly modified or duplicated. This is ' +
|
|
81
|
+
'probably not intentional.'
|
|
82
|
+
) : null);
|
|
68
83
|
}
|
|
69
84
|
("production" !== process.env.NODE_ENV ? invariant(
|
|
70
85
|
props.style == null || typeof props.style === 'object',
|
|
@@ -78,11 +93,10 @@ function putListener(id, registrationName, listener, transaction) {
|
|
|
78
93
|
if ("production" !== process.env.NODE_ENV) {
|
|
79
94
|
// IE8 has no API for event capturing and the `onScroll` event doesn't
|
|
80
95
|
// bubble.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
96
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
97
|
+
registrationName !== 'onScroll' || isEventSupported('scroll', true),
|
|
98
|
+
'This browser doesn\'t support the `onScroll` event'
|
|
99
|
+
) : null);
|
|
86
100
|
}
|
|
87
101
|
var container = ReactMount.findReactContainerForID(id);
|
|
88
102
|
if (container) {
|
|
@@ -147,7 +161,6 @@ function validateDangerousTag(tag) {
|
|
|
147
161
|
* object mapping of style properties to values.
|
|
148
162
|
*
|
|
149
163
|
* @constructor ReactDOMComponent
|
|
150
|
-
* @extends ReactComponent
|
|
151
164
|
* @extends ReactMultiChild
|
|
152
165
|
*/
|
|
153
166
|
function ReactDOMComponent(tag) {
|
|
@@ -162,6 +175,10 @@ ReactDOMComponent.displayName = 'ReactDOMComponent';
|
|
|
162
175
|
|
|
163
176
|
ReactDOMComponent.Mixin = {
|
|
164
177
|
|
|
178
|
+
construct: function(element) {
|
|
179
|
+
this._currentElement = element;
|
|
180
|
+
},
|
|
181
|
+
|
|
165
182
|
/**
|
|
166
183
|
* Generates root tag markup then recurses. This method has side effects and
|
|
167
184
|
* is not idempotent.
|
|
@@ -172,12 +189,6 @@ ReactDOMComponent.Mixin = {
|
|
|
172
189
|
* @return {string} The computed markup.
|
|
173
190
|
*/
|
|
174
191
|
mountComponent: function(rootID, transaction, context) {
|
|
175
|
-
ReactComponent.Mixin.mountComponent.call(
|
|
176
|
-
this,
|
|
177
|
-
rootID,
|
|
178
|
-
transaction,
|
|
179
|
-
context
|
|
180
|
-
);
|
|
181
192
|
this._rootNodeID = rootID;
|
|
182
193
|
assertValidProps(this._currentElement.props);
|
|
183
194
|
var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>';
|
|
@@ -271,7 +282,7 @@ ReactDOMComponent.Mixin = {
|
|
|
271
282
|
CONTENT_TYPES[typeof props.children] ? props.children : null;
|
|
272
283
|
var childrenToUse = contentToUse != null ? null : props.children;
|
|
273
284
|
if (contentToUse != null) {
|
|
274
|
-
return prefix +
|
|
285
|
+
return prefix + escapeTextContentForBrowser(contentToUse);
|
|
275
286
|
} else if (childrenToUse != null) {
|
|
276
287
|
var mountImages = this.mountChildren(
|
|
277
288
|
childrenToUse,
|
|
@@ -285,18 +296,6 @@ ReactDOMComponent.Mixin = {
|
|
|
285
296
|
},
|
|
286
297
|
|
|
287
298
|
receiveComponent: function(nextElement, transaction, context) {
|
|
288
|
-
if (nextElement === this._currentElement &&
|
|
289
|
-
nextElement._owner != null) {
|
|
290
|
-
// Since elements are immutable after the owner is rendered,
|
|
291
|
-
// we can do a cheap identity compare here to determine if this is a
|
|
292
|
-
// superfluous reconcile. It's possible for state to be mutable but such
|
|
293
|
-
// change should trigger an update of the owner which would recreate
|
|
294
|
-
// the element. We explicitly check for the existence of an owner since
|
|
295
|
-
// it's possible for an element created outside a composite to be
|
|
296
|
-
// deeply mutated and reused.
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
299
|
var prevElement = this._currentElement;
|
|
301
300
|
this._currentElement = nextElement;
|
|
302
301
|
this.updateComponent(transaction, prevElement, nextElement, context);
|
|
@@ -314,13 +313,6 @@ ReactDOMComponent.Mixin = {
|
|
|
314
313
|
*/
|
|
315
314
|
updateComponent: function(transaction, prevElement, nextElement, context) {
|
|
316
315
|
assertValidProps(this._currentElement.props);
|
|
317
|
-
ReactComponent.Mixin.updateComponent.call(
|
|
318
|
-
this,
|
|
319
|
-
transaction,
|
|
320
|
-
prevElement,
|
|
321
|
-
nextElement,
|
|
322
|
-
context
|
|
323
|
-
);
|
|
324
316
|
this._updateDOMProperties(prevElement.props, transaction);
|
|
325
317
|
this._updateDOMChildren(prevElement.props, transaction, context);
|
|
326
318
|
},
|
|
@@ -483,8 +475,7 @@ ReactDOMComponent.Mixin = {
|
|
|
483
475
|
unmountComponent: function() {
|
|
484
476
|
this.unmountChildren();
|
|
485
477
|
ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);
|
|
486
|
-
|
|
487
|
-
ReactMount.purgeID(this._rootNodeID);
|
|
478
|
+
ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
|
|
488
479
|
this._rootNodeID = null;
|
|
489
480
|
}
|
|
490
481
|
|
|
@@ -497,7 +488,6 @@ ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', {
|
|
|
497
488
|
|
|
498
489
|
assign(
|
|
499
490
|
ReactDOMComponent.prototype,
|
|
500
|
-
ReactComponent.Mixin,
|
|
501
491
|
ReactDOMComponent.Mixin,
|
|
502
492
|
ReactMultiChild.Mixin
|
|
503
493
|
);
|
package/lib/ReactDOMForm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactDOMForm
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var EventConstants = require("./EventConstants");
|
|
15
15
|
var LocalEventTrapMixin = require("./LocalEventTrapMixin");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
/*jslint evil: true */
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
'use strict';
|
|
16
16
|
|
|
17
17
|
var CSSPropertyOperations = require("./CSSPropertyOperations");
|
|
18
18
|
var DOMChildrenOperations = require("./DOMChildrenOperations");
|
|
@@ -132,8 +132,8 @@ var ReactDOMIDOperations = {
|
|
|
132
132
|
* @see {Danger.dangerouslyReplaceNodeWithMarkup}
|
|
133
133
|
*/
|
|
134
134
|
dangerouslyReplaceNodeWithMarkupByID: function(id, markup) {
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
var node = ReactMount.getNode(id);
|
|
136
|
+
DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
|
|
137
137
|
},
|
|
138
138
|
|
|
139
139
|
/**
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013-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
|
+
* @providesModule ReactDOMIframe
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
var EventConstants = require("./EventConstants");
|
|
15
|
+
var LocalEventTrapMixin = require("./LocalEventTrapMixin");
|
|
16
|
+
var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");
|
|
17
|
+
var ReactClass = require("./ReactClass");
|
|
18
|
+
var ReactElement = require("./ReactElement");
|
|
19
|
+
|
|
20
|
+
var iframe = ReactElement.createFactory('iframe');
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Since onLoad doesn't bubble OR capture on the top level in IE8, we need to
|
|
24
|
+
* capture it on the <iframe> element itself. There are lots of hacks we could
|
|
25
|
+
* do to accomplish this, but the most reliable is to make <iframe> a composite
|
|
26
|
+
* component and use `componentDidMount` to attach the event handlers.
|
|
27
|
+
*/
|
|
28
|
+
var ReactDOMIframe = ReactClass.createClass({
|
|
29
|
+
displayName: 'ReactDOMIframe',
|
|
30
|
+
tagName: 'IFRAME',
|
|
31
|
+
|
|
32
|
+
mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],
|
|
33
|
+
|
|
34
|
+
render: function() {
|
|
35
|
+
return iframe(this.props);
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
componentDidMount: function() {
|
|
39
|
+
this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
module.exports = ReactDOMIframe;
|
package/lib/ReactDOMImg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactDOMImg
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var EventConstants = require("./EventConstants");
|
|
15
15
|
var LocalEventTrapMixin = require("./LocalEventTrapMixin");
|
package/lib/ReactDOMInput.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactDOMInput
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var AutoFocusMixin = require("./AutoFocusMixin");
|
|
15
15
|
var DOMPropertyOperations = require("./DOMPropertyOperations");
|
package/lib/ReactDOMOption.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactDOMOption
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");
|
|
15
15
|
var ReactClass = require("./ReactClass");
|
package/lib/ReactDOMSelect.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactDOMSelect
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var AutoFocusMixin = require("./AutoFocusMixin");
|
|
15
15
|
var LinkedValueUtils = require("./LinkedValueUtils");
|
|
@@ -39,7 +39,7 @@ function updateOptionsIfPendingUpdateAndMounted() {
|
|
|
39
39
|
*/
|
|
40
40
|
function selectValueType(props, propName, componentName) {
|
|
41
41
|
if (props[propName] == null) {
|
|
42
|
-
return;
|
|
42
|
+
return null;
|
|
43
43
|
}
|
|
44
44
|
if (props.multiple) {
|
|
45
45
|
if (!Array.isArray(props[propName])) {
|
package/lib/ReactDOMSelection.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule ReactDOMSelection
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var ExecutionEnvironment = require("./ExecutionEnvironment");
|
|
15
15
|
|