react 0.11.0 → 0.12.0
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 +1373 -963
- package/dist/react-with-addons.js +3151 -3585
- package/dist/react-with-addons.min.js +11 -17
- package/dist/react.js +2960 -3308
- package/dist/react.min.js +11 -16
- package/lib/AutoFocusMixin.js +5 -12
- package/lib/BeforeInputEventPlugin.js +12 -14
- package/lib/CSSCore.js +6 -13
- package/lib/CSSProperty.js +5 -12
- package/lib/CSSPropertyOperations.js +46 -12
- package/lib/CallbackQueue.js +7 -14
- package/lib/ChangeEventPlugin.js +5 -12
- package/lib/ClientReactRootIndex.js +5 -12
- package/lib/CompositionEventPlugin.js +5 -12
- package/lib/DOMChildrenOperations.js +8 -15
- package/lib/DOMProperty.js +16 -19
- package/lib/DOMPropertyOperations.js +14 -14
- package/lib/Danger.js +12 -17
- package/lib/DefaultEventPluginOrder.js +5 -12
- package/lib/EnterLeaveEventPlugin.js +5 -12
- package/lib/EventConstants.js +5 -12
- package/lib/EventListener.js +14 -0
- package/lib/EventPluginHub.js +8 -26
- package/lib/EventPluginRegistry.js +5 -12
- package/lib/EventPluginUtils.js +5 -12
- package/lib/EventPropagators.js +12 -17
- package/lib/ExecutionEnvironment.js +5 -12
- package/lib/HTMLDOMPropertyConfig.js +14 -16
- package/lib/LinkedStateMixin.js +5 -12
- package/lib/LinkedValueUtils.js +5 -12
- package/lib/LocalEventTrapMixin.js +8 -14
- package/lib/MobileSafariClickEventPlugin.js +5 -12
- package/lib/Object.assign.js +45 -0
- package/lib/PooledClass.js +5 -12
- package/lib/React.js +91 -38
- package/lib/ReactBrowserComponentMixin.js +5 -12
- package/lib/ReactBrowserEventEmitter.js +7 -14
- package/lib/ReactCSSTransitionGroup.js +15 -17
- package/lib/ReactCSSTransitionGroupChild.js +9 -13
- package/lib/ReactChildren.js +5 -12
- package/lib/ReactComponent.js +61 -68
- package/lib/ReactComponentBrowserEnvironment.js +5 -12
- package/lib/ReactComponentWithPureRenderMixin.js +5 -12
- package/lib/ReactCompositeComponent.js +199 -180
- package/lib/ReactContext.js +8 -15
- package/lib/ReactCurrentOwner.js +5 -12
- package/lib/ReactDOM.js +145 -175
- package/lib/ReactDOMButton.js +8 -14
- package/lib/ReactDOMComponent.js +103 -38
- package/lib/ReactDOMForm.js +9 -15
- package/lib/ReactDOMIDOperations.js +5 -12
- package/lib/ReactDOMImg.js +8 -14
- package/lib/ReactDOMInput.js +30 -38
- package/lib/ReactDOMOption.js +8 -14
- package/lib/ReactDOMSelect.js +25 -24
- package/lib/ReactDOMSelection.js +11 -18
- package/lib/ReactDOMTextarea.js +19 -24
- package/lib/ReactDefaultBatchingStrategy.js +14 -18
- package/lib/ReactDefaultInjection.js +23 -26
- package/lib/ReactDefaultPerf.js +13 -16
- package/lib/ReactDefaultPerfAnalysis.js +18 -17
- package/lib/ReactElement.js +242 -0
- package/lib/{ReactDescriptorValidator.js → ReactElementValidator.js} +48 -65
- package/lib/ReactEmptyComponent.js +8 -13
- package/lib/ReactErrorUtils.js +5 -12
- package/lib/ReactEventEmitterMixin.js +5 -12
- package/lib/ReactEventListener.js +7 -14
- package/lib/ReactInjection.js +7 -14
- package/lib/ReactInputSelection.js +5 -12
- package/lib/ReactInstanceHandles.js +5 -12
- package/lib/ReactLegacyElement.js +243 -0
- package/lib/ReactLink.js +5 -12
- package/lib/ReactMarkupChecksum.js +5 -12
- package/lib/ReactMount.js +45 -32
- package/lib/ReactMultiChild.js +14 -18
- package/lib/ReactMultiChildUpdateTypes.js +5 -12
- package/lib/ReactNativeComponent.js +69 -0
- package/lib/ReactOwner.js +5 -12
- package/lib/ReactPerf.js +8 -13
- package/lib/ReactPropTransferer.js +34 -33
- package/lib/ReactPropTypeLocationNames.js +5 -12
- package/lib/ReactPropTypeLocations.js +5 -12
- package/lib/ReactPropTypes.js +38 -29
- package/lib/ReactPutListenerQueue.js +7 -14
- package/lib/ReactReconcileTransaction.js +7 -15
- package/lib/ReactRootIndex.js +5 -12
- package/lib/ReactServerRendering.js +21 -34
- package/lib/ReactServerRenderingTransaction.js +11 -15
- package/lib/ReactStateSetters.js +5 -12
- package/lib/ReactTestUtils.js +31 -33
- package/lib/ReactTextComponent.js +18 -21
- package/lib/ReactTransitionChildMapping.js +6 -13
- package/lib/ReactTransitionEvents.js +5 -12
- package/lib/ReactTransitionGroup.js +14 -17
- package/lib/ReactUpdates.js +43 -22
- package/lib/ReactWithAddons.js +7 -13
- package/lib/SVGDOMPropertyConfig.js +5 -12
- package/lib/SelectEventPlugin.js +13 -20
- package/lib/ServerReactRootIndex.js +5 -12
- package/lib/SimpleEventPlugin.js +20 -15
- package/lib/SyntheticClipboardEvent.js +5 -12
- package/lib/SyntheticCompositionEvent.js +5 -12
- package/lib/SyntheticDragEvent.js +5 -12
- package/lib/SyntheticEvent.js +9 -17
- package/lib/SyntheticFocusEvent.js +5 -12
- package/lib/SyntheticInputEvent.js +4 -11
- package/lib/SyntheticKeyboardEvent.js +17 -19
- package/lib/SyntheticMouseEvent.js +6 -13
- package/lib/SyntheticTouchEvent.js +5 -12
- package/lib/SyntheticUIEvent.js +5 -12
- package/lib/SyntheticWheelEvent.js +5 -12
- package/lib/Transaction.js +5 -12
- package/lib/ViewportMetrics.js +5 -12
- package/lib/accumulateInto.js +62 -0
- package/lib/adler32.js +6 -13
- package/lib/camelize.js +30 -0
- package/lib/camelizeStyleName.js +40 -0
- package/lib/cloneWithProps.js +9 -15
- package/lib/containsNode.js +5 -12
- package/lib/copyProperties.js +12 -12
- package/lib/createArrayFrom.js +5 -12
- package/lib/createFullPageComponent.js +12 -18
- package/lib/createNodesFromMarkup.js +5 -12
- package/lib/cx.js +5 -12
- package/lib/dangerousStyleValue.js +5 -12
- package/lib/deprecated.js +47 -0
- package/lib/emptyFunction.js +11 -22
- package/lib/emptyObject.js +5 -12
- package/lib/escapeTextForBrowser.js +5 -12
- package/lib/flattenChildren.js +19 -13
- package/lib/focusNode.js +10 -16
- package/lib/forEachAccumulated.js +5 -12
- package/lib/getActiveElement.js +5 -12
- package/lib/getEventCharCode.js +50 -0
- package/lib/getEventKey.js +9 -21
- package/lib/getEventModifierState.js +10 -17
- package/lib/getEventTarget.js +5 -12
- package/lib/getMarkupWrap.js +5 -12
- package/lib/getNodeForCharacterOffset.js +5 -12
- package/lib/getReactRootElementInContainer.js +5 -12
- package/lib/getTextContentAccessor.js +5 -12
- package/lib/getUnboundedScrollPosition.js +5 -12
- package/lib/hyphenate.js +5 -12
- package/lib/hyphenateStyleName.js +8 -15
- package/lib/instantiateReactComponent.js +90 -42
- package/lib/invariant.js +5 -12
- package/lib/isEventSupported.js +5 -12
- package/lib/isNode.js +5 -12
- package/lib/isTextInputElement.js +5 -12
- package/lib/isTextNode.js +5 -12
- package/lib/joinClasses.js +8 -13
- package/lib/keyMirror.js +5 -12
- package/lib/keyOf.js +5 -12
- package/lib/mapObject.js +35 -36
- package/lib/memoizeStringOnly.js +5 -12
- package/lib/merge.js +14 -17
- package/lib/mergeInto.js +13 -35
- package/lib/monitorCodeUse.js +5 -12
- package/lib/onlyChild.js +8 -15
- package/lib/performance.js +5 -12
- package/lib/performanceNow.js +5 -12
- package/lib/setInnerHTML.js +19 -20
- package/lib/shallowEqual.js +6 -13
- package/lib/shouldUpdateReactComponent.js +14 -22
- package/lib/toArray.js +5 -12
- package/lib/traverseAllChildren.js +34 -48
- package/lib/update.js +8 -15
- package/lib/warning.js +5 -12
- package/package.json +3 -8
- package/lib/ReactDescriptor.js +0 -251
- package/lib/accumulate.js +0 -54
- package/lib/mergeHelpers.js +0 -147
- package/lib/mixInto.js +0 -34
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule DOMPropertyOperations
|
|
17
10
|
* @typechecks static-only
|
|
@@ -138,10 +131,17 @@ var DOMPropertyOperations = {
|
|
|
138
131
|
} else if (shouldIgnoreValue(name, value)) {
|
|
139
132
|
this.deleteValueForProperty(node, name);
|
|
140
133
|
} else if (DOMProperty.mustUseAttribute[name]) {
|
|
134
|
+
// `setAttribute` with objects becomes only `[object]` in IE8/9,
|
|
135
|
+
// ('' + value) makes it output the correct toString()-value.
|
|
141
136
|
node.setAttribute(DOMProperty.getAttributeName[name], '' + value);
|
|
142
137
|
} else {
|
|
143
138
|
var propName = DOMProperty.getPropertyName[name];
|
|
144
|
-
|
|
139
|
+
// Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the
|
|
140
|
+
// property type before comparing; only `value` does and is string.
|
|
141
|
+
if (!DOMProperty.hasSideEffects[name] ||
|
|
142
|
+
('' + node[propName]) !== ('' + value)) {
|
|
143
|
+
// Contrary to `setAttribute`, object properties are properly
|
|
144
|
+
// `toString`ed by IE8/9.
|
|
145
145
|
node[propName] = value;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -177,7 +177,7 @@ var DOMPropertyOperations = {
|
|
|
177
177
|
propName
|
|
178
178
|
);
|
|
179
179
|
if (!DOMProperty.hasSideEffects[name] ||
|
|
180
|
-
node[propName] !== defaultValue) {
|
|
180
|
+
('' + node[propName]) !== defaultValue) {
|
|
181
181
|
node[propName] = defaultValue;
|
|
182
182
|
}
|
|
183
183
|
}
|
package/lib/Danger.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule Danger
|
|
17
10
|
* @typechecks static-only
|
|
@@ -60,9 +53,10 @@ var Danger = {
|
|
|
60
53
|
dangerouslyRenderMarkup: function(markupList) {
|
|
61
54
|
("production" !== process.env.NODE_ENV ? invariant(
|
|
62
55
|
ExecutionEnvironment.canUseDOM,
|
|
63
|
-
'dangerouslyRenderMarkup(...): Cannot render markup in a
|
|
64
|
-
'thread.
|
|
65
|
-
'
|
|
56
|
+
'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' +
|
|
57
|
+
'thread. Make sure `window` and `document` are available globally ' +
|
|
58
|
+
'before requiring React when unit testing or use ' +
|
|
59
|
+
'React.renderToString for server rendering.'
|
|
66
60
|
) : invariant(ExecutionEnvironment.canUseDOM));
|
|
67
61
|
var nodeName;
|
|
68
62
|
var markupByNodeName = {};
|
|
@@ -166,8 +160,9 @@ var Danger = {
|
|
|
166
160
|
("production" !== process.env.NODE_ENV ? invariant(
|
|
167
161
|
ExecutionEnvironment.canUseDOM,
|
|
168
162
|
'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' +
|
|
169
|
-
'worker thread.
|
|
170
|
-
'
|
|
163
|
+
'worker thread. Make sure `window` and `document` are available ' +
|
|
164
|
+
'globally before requiring React when unit testing or use ' +
|
|
165
|
+
'React.renderToString for server rendering.'
|
|
171
166
|
) : invariant(ExecutionEnvironment.canUseDOM));
|
|
172
167
|
("production" !== process.env.NODE_ENV ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup));
|
|
173
168
|
("production" !== process.env.NODE_ENV ? invariant(
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule DefaultEventPluginOrder
|
|
17
10
|
*/
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule EnterLeaveEventPlugin
|
|
17
10
|
* @typechecks static-only
|
package/lib/EventConstants.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule EventConstants
|
|
17
10
|
*/
|
package/lib/EventListener.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Copyright 2013-2014 Facebook, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
2
16
|
* @providesModule EventListener
|
|
3
17
|
* @typechecks
|
|
4
18
|
*/
|
package/lib/EventPluginHub.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule EventPluginHub
|
|
17
10
|
*/
|
|
@@ -21,11 +14,9 @@
|
|
|
21
14
|
var EventPluginRegistry = require("./EventPluginRegistry");
|
|
22
15
|
var EventPluginUtils = require("./EventPluginUtils");
|
|
23
16
|
|
|
24
|
-
var
|
|
17
|
+
var accumulateInto = require("./accumulateInto");
|
|
25
18
|
var forEachAccumulated = require("./forEachAccumulated");
|
|
26
19
|
var invariant = require("./invariant");
|
|
27
|
-
var isEventSupported = require("./isEventSupported");
|
|
28
|
-
var monitorCodeUse = require("./monitorCodeUse");
|
|
29
20
|
|
|
30
21
|
/**
|
|
31
22
|
* Internal store for event listeners
|
|
@@ -159,15 +150,6 @@ var EventPluginHub = {
|
|
|
159
150
|
registrationName, typeof listener
|
|
160
151
|
) : invariant(!listener || typeof listener === 'function'));
|
|
161
152
|
|
|
162
|
-
if ("production" !== process.env.NODE_ENV) {
|
|
163
|
-
// IE8 has no API for event capturing and the `onScroll` event doesn't
|
|
164
|
-
// bubble.
|
|
165
|
-
if (registrationName === 'onScroll' &&
|
|
166
|
-
!isEventSupported('scroll', true)) {
|
|
167
|
-
monitorCodeUse('react_no_scroll_event');
|
|
168
|
-
console.warn('This browser doesn\'t support the `onScroll` event');
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
153
|
var bankForRegistrationName =
|
|
172
154
|
listenerBank[registrationName] || (listenerBank[registrationName] = {});
|
|
173
155
|
bankForRegistrationName[id] = listener;
|
|
@@ -236,7 +218,7 @@ var EventPluginHub = {
|
|
|
236
218
|
nativeEvent
|
|
237
219
|
);
|
|
238
220
|
if (extractedEvents) {
|
|
239
|
-
events =
|
|
221
|
+
events = accumulateInto(events, extractedEvents);
|
|
240
222
|
}
|
|
241
223
|
}
|
|
242
224
|
}
|
|
@@ -252,7 +234,7 @@ var EventPluginHub = {
|
|
|
252
234
|
*/
|
|
253
235
|
enqueueEvents: function(events) {
|
|
254
236
|
if (events) {
|
|
255
|
-
eventQueue =
|
|
237
|
+
eventQueue = accumulateInto(eventQueue, events);
|
|
256
238
|
}
|
|
257
239
|
},
|
|
258
240
|
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule EventPluginRegistry
|
|
17
10
|
* @typechecks static-only
|
package/lib/EventPluginUtils.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule EventPluginUtils
|
|
17
10
|
*/
|
package/lib/EventPropagators.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule EventPropagators
|
|
17
10
|
*/
|
|
@@ -21,7 +14,7 @@
|
|
|
21
14
|
var EventConstants = require("./EventConstants");
|
|
22
15
|
var EventPluginHub = require("./EventPluginHub");
|
|
23
16
|
|
|
24
|
-
var
|
|
17
|
+
var accumulateInto = require("./accumulateInto");
|
|
25
18
|
var forEachAccumulated = require("./forEachAccumulated");
|
|
26
19
|
|
|
27
20
|
var PropagationPhases = EventConstants.PropagationPhases;
|
|
@@ -52,8 +45,9 @@ function accumulateDirectionalDispatches(domID, upwards, event) {
|
|
|
52
45
|
var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
|
|
53
46
|
var listener = listenerAtPhase(domID, event, phase);
|
|
54
47
|
if (listener) {
|
|
55
|
-
event._dispatchListeners =
|
|
56
|
-
|
|
48
|
+
event._dispatchListeners =
|
|
49
|
+
accumulateInto(event._dispatchListeners, listener);
|
|
50
|
+
event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);
|
|
57
51
|
}
|
|
58
52
|
}
|
|
59
53
|
|
|
@@ -85,8 +79,9 @@ function accumulateDispatches(id, ignoredDirection, event) {
|
|
|
85
79
|
var registrationName = event.dispatchConfig.registrationName;
|
|
86
80
|
var listener = getListener(id, registrationName);
|
|
87
81
|
if (listener) {
|
|
88
|
-
event._dispatchListeners =
|
|
89
|
-
|
|
82
|
+
event._dispatchListeners =
|
|
83
|
+
accumulateInto(event._dispatchListeners, listener);
|
|
84
|
+
event._dispatchIDs = accumulateInto(event._dispatchIDs, id);
|
|
90
85
|
}
|
|
91
86
|
}
|
|
92
87
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule ExecutionEnvironment
|
|
17
10
|
*/
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-2014 Facebook, Inc.
|
|
2
|
+
* Copyright 2013-2014, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
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.
|
|
15
8
|
*
|
|
16
9
|
* @providesModule HTMLDOMPropertyConfig
|
|
17
10
|
*/
|
|
@@ -56,6 +49,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
56
49
|
* Standard Properties
|
|
57
50
|
*/
|
|
58
51
|
accept: null,
|
|
52
|
+
acceptCharset: null,
|
|
59
53
|
accessKey: null,
|
|
60
54
|
action: null,
|
|
61
55
|
allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
|
|
@@ -70,6 +64,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
70
64
|
cellSpacing: null,
|
|
71
65
|
charSet: MUST_USE_ATTRIBUTE,
|
|
72
66
|
checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
67
|
+
classID: MUST_USE_ATTRIBUTE,
|
|
73
68
|
// To set className on SVG elements, it's necessary to use .setAttribute;
|
|
74
69
|
// this works on HTML elements too in all browsers except IE8. Conveniently,
|
|
75
70
|
// IE8 doesn't support SVG and so we can simply use the attribute in
|
|
@@ -105,10 +100,12 @@ var HTMLDOMPropertyConfig = {
|
|
|
105
100
|
id: MUST_USE_PROPERTY,
|
|
106
101
|
label: null,
|
|
107
102
|
lang: null,
|
|
108
|
-
list:
|
|
103
|
+
list: MUST_USE_ATTRIBUTE,
|
|
109
104
|
loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
105
|
+
manifest: MUST_USE_ATTRIBUTE,
|
|
110
106
|
max: null,
|
|
111
107
|
maxLength: MUST_USE_ATTRIBUTE,
|
|
108
|
+
media: MUST_USE_ATTRIBUTE,
|
|
112
109
|
mediaGroup: null,
|
|
113
110
|
method: null,
|
|
114
111
|
min: null,
|
|
@@ -116,6 +113,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
116
113
|
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
117
114
|
name: null,
|
|
118
115
|
noValidate: HAS_BOOLEAN_VALUE,
|
|
116
|
+
open: null,
|
|
119
117
|
pattern: null,
|
|
120
118
|
placeholder: null,
|
|
121
119
|
poster: null,
|
|
@@ -129,18 +127,17 @@ var HTMLDOMPropertyConfig = {
|
|
|
129
127
|
rowSpan: null,
|
|
130
128
|
sandbox: null,
|
|
131
129
|
scope: null,
|
|
132
|
-
scrollLeft: MUST_USE_PROPERTY,
|
|
133
130
|
scrolling: null,
|
|
134
|
-
scrollTop: MUST_USE_PROPERTY,
|
|
135
131
|
seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
|
|
136
132
|
selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
137
133
|
shape: null,
|
|
138
134
|
size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
|
|
135
|
+
sizes: MUST_USE_ATTRIBUTE,
|
|
139
136
|
span: HAS_POSITIVE_NUMERIC_VALUE,
|
|
140
137
|
spellCheck: null,
|
|
141
138
|
src: null,
|
|
142
139
|
srcDoc: MUST_USE_PROPERTY,
|
|
143
|
-
srcSet:
|
|
140
|
+
srcSet: MUST_USE_ATTRIBUTE,
|
|
144
141
|
start: HAS_NUMERIC_VALUE,
|
|
145
142
|
step: null,
|
|
146
143
|
style: null,
|
|
@@ -164,6 +161,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
164
161
|
property: null // Supports OG in meta tags
|
|
165
162
|
},
|
|
166
163
|
DOMAttributeNames: {
|
|
164
|
+
acceptCharset: 'accept-charset',
|
|
167
165
|
className: 'class',
|
|
168
166
|
htmlFor: 'for',
|
|
169
167
|
httpEquiv: 'http-equiv'
|