react 0.14.10 → 15.0.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/LICENSE +1 -1
- package/dist/react-with-addons.js +4900 -4627
- package/dist/react-with-addons.min.js +7 -7
- package/dist/react.js +4556 -4059
- package/dist/react.min.js +7 -7
- package/lib/AutoFocusUtils.js +3 -15
- package/lib/BeforeInputEventPlugin.js +8 -25
- package/lib/CSSProperty.js +10 -1
- package/lib/CSSPropertyOperations.js +49 -19
- package/lib/CallbackQueue.js +16 -4
- package/lib/ChangeEventPlugin.js +58 -54
- package/lib/DOMChildrenOperations.js +91 -61
- package/lib/DOMLazyTree.js +105 -0
- package/lib/{ClientReactRootIndex.js → DOMNamespaces.js} +7 -10
- package/lib/DOMProperty.js +18 -39
- package/lib/DOMPropertyOperations.js +42 -53
- package/lib/Danger.js +13 -14
- package/lib/DefaultEventPluginOrder.js +1 -1
- package/lib/EnterLeaveEventPlugin.js +24 -43
- package/lib/EventConstants.js +6 -1
- package/lib/EventPluginHub.js +22 -66
- package/lib/EventPluginRegistry.js +30 -9
- package/lib/EventPluginUtils.js +61 -36
- package/lib/EventPropagators.js +19 -17
- package/lib/FallbackCompositionState.js +4 -4
- package/lib/HTMLDOMPropertyConfig.js +131 -152
- package/lib/LinkedStateMixin.js +1 -2
- package/lib/LinkedValueUtils.js +6 -7
- package/lib/MetaMatchers.js +2 -2
- package/lib/OrderedMap.js +17 -16
- package/lib/PooledClass.js +2 -2
- package/lib/React.js +50 -20
- package/lib/ReactBrowserEventEmitter.js +19 -26
- package/lib/ReactCSSTransitionGroup.js +4 -5
- package/lib/ReactCSSTransitionGroupChild.js +1 -6
- package/lib/ReactChildReconciler.js +15 -13
- package/lib/ReactChildren.js +5 -4
- package/lib/ReactClass.js +44 -92
- package/lib/ReactComponent.js +9 -10
- package/lib/ReactComponentBrowserEnvironment.js +9 -6
- package/lib/ReactComponentEnvironment.js +4 -4
- package/lib/ReactComponentWithPureRenderMixin.js +2 -2
- package/lib/ReactCompositeComponent.js +166 -74
- package/lib/ReactCurrentOwner.js +2 -1
- package/lib/ReactDOM.js +27 -15
- package/lib/ReactDOMButton.js +2 -2
- package/lib/ReactDOMComponent.js +186 -250
- package/lib/ReactDOMComponentFlags.js +18 -0
- package/lib/ReactDOMComponentTree.js +186 -0
- package/lib/ReactDOMContainerInfo.js +32 -0
- package/lib/ReactDOMDebugTool.js +61 -0
- package/lib/ReactDOMEmptyComponent.js +60 -0
- package/lib/ReactDOMFactories.js +1 -2
- package/lib/ReactDOMFeatureFlags.js +2 -2
- package/lib/ReactDOMIDOperations.js +5 -60
- package/lib/ReactDOMInput.js +73 -23
- package/lib/ReactDOMInstrumentation.js +16 -0
- package/lib/ReactDOMOption.js +14 -12
- package/lib/ReactDOMSelect.js +43 -19
- package/lib/ReactDOMSelection.js +4 -4
- package/lib/ReactDOMServer.js +1 -1
- package/lib/ReactDOMTextComponent.js +87 -45
- package/lib/ReactDOMTextarea.js +39 -11
- package/lib/ReactDOMTreeTraversal.js +134 -0
- package/lib/ReactDOMUnknownPropertyDevtool.js +64 -0
- package/lib/ReactDebugInstanceMap.js +102 -0
- package/lib/ReactDebugTool.js +72 -0
- package/lib/ReactDefaultBatchingStrategy.js +4 -3
- package/lib/ReactDefaultInjection.js +11 -15
- package/lib/ReactDefaultPerf.js +105 -26
- package/lib/ReactDefaultPerfAnalysis.js +23 -15
- package/lib/ReactElement.js +63 -23
- package/lib/ReactElementValidator.js +9 -9
- package/lib/ReactEmptyComponent.js +8 -33
- package/lib/ReactErrorUtils.js +1 -2
- package/lib/ReactEventEmitterMixin.js +3 -8
- package/lib/ReactEventListener.js +23 -77
- package/lib/ReactFeatureFlags.js +21 -0
- package/lib/ReactFragment.js +6 -6
- package/lib/ReactInjection.js +3 -3
- package/lib/ReactInputSelection.js +4 -4
- package/lib/ReactInstanceHandles.js +10 -12
- package/lib/ReactInstanceMap.js +2 -1
- package/lib/ReactInstrumentation.js +16 -0
- package/lib/ReactInvalidSetStateWarningDevTool.js +36 -0
- package/lib/ReactLink.js +2 -3
- package/lib/ReactMarkupChecksum.js +8 -3
- package/lib/ReactMount.js +88 -460
- package/lib/ReactMultiChild.js +106 -200
- package/lib/ReactMultiChildUpdateTypes.js +1 -1
- package/lib/ReactNativeComponent.js +6 -5
- package/lib/ReactNodeTypes.js +37 -0
- package/lib/ReactNoopUpdateQueue.js +2 -25
- package/lib/ReactOwner.js +7 -6
- package/lib/ReactPerf.js +2 -2
- package/lib/ReactPropTransferer.js +5 -4
- package/lib/ReactPropTypeLocationNames.js +1 -1
- package/lib/ReactPropTypeLocations.js +1 -1
- package/lib/ReactPropTypes.js +31 -7
- package/lib/ReactReconcileTransaction.js +20 -9
- package/lib/ReactReconciler.js +29 -6
- package/lib/ReactRef.js +1 -1
- package/lib/ReactServerBatchingStrategy.js +1 -2
- package/lib/ReactServerRendering.js +17 -35
- package/lib/ReactServerRenderingTransaction.js +11 -29
- package/lib/ReactSimpleEmptyComponent.js +36 -0
- package/lib/ReactStateSetters.js +1 -1
- package/lib/ReactTestUtils.js +47 -28
- package/lib/ReactTransitionChildMapping.js +1 -2
- package/lib/ReactTransitionEvents.js +8 -44
- package/lib/ReactTransitionGroup.js +4 -3
- package/lib/ReactUMDEntry.js +26 -0
- package/lib/ReactUpdateQueue.js +24 -66
- package/lib/ReactUpdates.js +29 -11
- package/lib/ReactVersion.js +2 -2
- package/lib/ReactWithAddons.js +1 -21
- package/lib/ReactWithAddonsUMDEntry.js +26 -0
- package/lib/ResponderEventPlugin.js +54 -66
- package/lib/ResponderSyntheticEvent.js +2 -3
- package/lib/ResponderTouchHistoryStore.js +5 -5
- package/lib/SVGDOMPropertyConfig.js +267 -94
- package/lib/SelectEventPlugin.js +13 -18
- package/lib/SimpleEventPlugin.js +57 -17
- package/lib/SyntheticAnimationEvent.js +39 -0
- package/lib/SyntheticClipboardEvent.js +2 -3
- package/lib/SyntheticCompositionEvent.js +2 -3
- package/lib/SyntheticDragEvent.js +2 -3
- package/lib/SyntheticEvent.js +102 -21
- package/lib/SyntheticFocusEvent.js +2 -3
- package/lib/SyntheticInputEvent.js +2 -3
- package/lib/SyntheticKeyboardEvent.js +2 -3
- package/lib/SyntheticMouseEvent.js +2 -3
- package/lib/SyntheticTouchEvent.js +2 -3
- package/lib/SyntheticTransitionEvent.js +39 -0
- package/lib/SyntheticUIEvent.js +2 -3
- package/lib/SyntheticWheelEvent.js +2 -3
- package/lib/TapEventPlugin.js +3 -12
- package/lib/Transaction.js +3 -3
- package/lib/ViewportMetrics.js +1 -1
- package/lib/accumulate.js +2 -2
- package/lib/accumulateInto.js +2 -2
- package/lib/adler32.js +3 -2
- package/lib/canDefineProperty.js +1 -1
- package/lib/createHierarchyRenderer.js +1 -1
- package/lib/createMicrosoftUnsafeLocalFunction.js +32 -0
- package/lib/dangerousStyleValue.js +25 -3
- package/lib/deprecated.js +7 -4
- package/lib/escapeTextContentForBrowser.js +1 -1
- package/lib/findDOMNode.js +15 -8
- package/lib/flattenChildren.js +2 -2
- package/lib/forEachAccumulated.js +2 -1
- package/lib/getEventCharCode.js +2 -2
- package/lib/getEventKey.js +1 -2
- package/lib/getEventModifierState.js +1 -2
- package/lib/getEventTarget.js +8 -2
- package/lib/getIteratorFn.js +2 -2
- package/lib/getNativeComponentFromComposite.js +30 -0
- package/lib/getNodeForCharacterOffset.js +2 -1
- package/lib/getTestDocument.js +1 -1
- package/lib/getTextContentAccessor.js +1 -1
- package/lib/getVendorPrefixedEventName.js +101 -0
- package/lib/instantiateReactComponent.js +12 -13
- package/lib/isEventSupported.js +2 -2
- package/lib/isTextInputElement.js +2 -1
- package/lib/onlyChild.js +2 -2
- package/lib/quoteAttributeValueForBrowser.js +1 -1
- package/lib/reactComponentExpect.js +5 -4
- package/lib/renderSubtreeIntoContainer.js +1 -1
- package/lib/setInnerHTML.js +6 -14
- package/lib/setTextContent.js +1 -1
- package/lib/shallowCompare.js +1 -1
- package/lib/shouldUpdateReactComponent.js +2 -3
- package/lib/sliceChildren.js +1 -1
- package/lib/traverseAllChildren.js +8 -8
- package/lib/update.js +16 -15
- package/lib/validateDOMNesting.js +18 -13
- package/package.json +23 -32
- package/addons.js +0 -13
- package/cjs/react-jsx-dev-runtime.development.js +0 -861
- package/cjs/react-jsx-dev-runtime.production.min.js +0 -9
- package/cjs/react-jsx-runtime.development.js +0 -883
- package/cjs/react-jsx-runtime.production.min.js +0 -10
- package/jsx-dev-runtime.js +0 -7
- package/jsx-runtime.js +0 -7
- package/lib/Object.assign.js +0 -47
- package/lib/React.native.js +0 -5
- package/lib/ReactBrowserComponentMixin.js +0 -36
- package/lib/ReactEmptyComponentRegistry.js +0 -48
- package/lib/ReactIsomorphic.js +0 -74
- package/lib/ReactRootIndex.js +0 -29
- package/lib/ServerReactRootIndex.js +0 -29
- package/lib/cloneWithProps.js +0 -54
- package/lib/webcomponents.js +0 -6379
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*
|
|
9
9
|
* @providesModule EventPluginRegistry
|
|
10
|
-
* @typechecks static-only
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
'use strict';
|
|
@@ -37,15 +36,15 @@ function recomputePluginOrdering() {
|
|
|
37
36
|
for (var pluginName in namesToPlugins) {
|
|
38
37
|
var PluginModule = namesToPlugins[pluginName];
|
|
39
38
|
var pluginIndex = EventPluginOrder.indexOf(pluginName);
|
|
40
|
-
!(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) :
|
|
39
|
+
!(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : void 0;
|
|
41
40
|
if (EventPluginRegistry.plugins[pluginIndex]) {
|
|
42
41
|
continue;
|
|
43
42
|
}
|
|
44
|
-
!PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) :
|
|
43
|
+
!PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : void 0;
|
|
45
44
|
EventPluginRegistry.plugins[pluginIndex] = PluginModule;
|
|
46
45
|
var publishedEvents = PluginModule.eventTypes;
|
|
47
46
|
for (var eventName in publishedEvents) {
|
|
48
|
-
!publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) :
|
|
47
|
+
!publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : void 0;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
}
|
|
@@ -59,7 +58,7 @@ function recomputePluginOrdering() {
|
|
|
59
58
|
* @private
|
|
60
59
|
*/
|
|
61
60
|
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
|
|
62
|
-
!!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) :
|
|
61
|
+
!!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : void 0;
|
|
63
62
|
EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
|
|
64
63
|
|
|
65
64
|
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
|
@@ -87,9 +86,14 @@ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
|
|
|
87
86
|
* @private
|
|
88
87
|
*/
|
|
89
88
|
function publishRegistrationName(registrationName, PluginModule, eventName) {
|
|
90
|
-
!!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) :
|
|
89
|
+
!!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : void 0;
|
|
91
90
|
EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
|
|
92
91
|
EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
|
|
92
|
+
|
|
93
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
94
|
+
var lowerCasedName = registrationName.toLowerCase();
|
|
95
|
+
EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
|
|
96
|
+
}
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
/**
|
|
@@ -119,6 +123,14 @@ var EventPluginRegistry = {
|
|
|
119
123
|
*/
|
|
120
124
|
registrationNameDependencies: {},
|
|
121
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Mapping from lowercase registration names to the properly cased version,
|
|
128
|
+
* used to warn in the case of missing event handlers. Available
|
|
129
|
+
* only in __DEV__.
|
|
130
|
+
* @type {Object}
|
|
131
|
+
*/
|
|
132
|
+
possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,
|
|
133
|
+
|
|
122
134
|
/**
|
|
123
135
|
* Injects an ordering of plugins (by plugin name). This allows the ordering
|
|
124
136
|
* to be decoupled from injection of the actual plugins so that ordering is
|
|
@@ -129,7 +141,7 @@ var EventPluginRegistry = {
|
|
|
129
141
|
* @see {EventPluginHub.injection.injectEventPluginOrder}
|
|
130
142
|
*/
|
|
131
143
|
injectEventPluginOrder: function (InjectedEventPluginOrder) {
|
|
132
|
-
!!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) :
|
|
144
|
+
!!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : void 0;
|
|
133
145
|
// Clone the ordering so it cannot be dynamically mutated.
|
|
134
146
|
EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
|
|
135
147
|
recomputePluginOrdering();
|
|
@@ -153,7 +165,7 @@ var EventPluginRegistry = {
|
|
|
153
165
|
}
|
|
154
166
|
var PluginModule = injectedNamesToPlugins[pluginName];
|
|
155
167
|
if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
|
|
156
|
-
!!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) :
|
|
168
|
+
!!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : void 0;
|
|
157
169
|
namesToPlugins[pluginName] = PluginModule;
|
|
158
170
|
isOrderingDirty = true;
|
|
159
171
|
}
|
|
@@ -213,6 +225,15 @@ var EventPluginRegistry = {
|
|
|
213
225
|
delete registrationNameModules[registrationName];
|
|
214
226
|
}
|
|
215
227
|
}
|
|
228
|
+
|
|
229
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
230
|
+
var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
|
|
231
|
+
for (var lowerCasedName in possibleRegistrationNames) {
|
|
232
|
+
if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
|
|
233
|
+
delete possibleRegistrationNames[lowerCasedName];
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
216
237
|
}
|
|
217
238
|
|
|
218
239
|
};
|
package/lib/EventPluginUtils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -22,15 +22,22 @@ var warning = require('fbjs/lib/warning');
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* - `
|
|
26
|
-
* actual node references.
|
|
25
|
+
* - `ComponentTree`: [required] Module that can convert between React instances
|
|
26
|
+
* and actual node references.
|
|
27
27
|
*/
|
|
28
|
+
var ComponentTree;
|
|
29
|
+
var TreeTraversal;
|
|
28
30
|
var injection = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
injection.Mount = InjectedMount;
|
|
31
|
+
injectComponentTree: function (Injected) {
|
|
32
|
+
ComponentTree = Injected;
|
|
32
33
|
if (process.env.NODE_ENV !== 'production') {
|
|
33
|
-
process.env.NODE_ENV !== 'production' ? warning(
|
|
34
|
+
process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
injectTreeTraversal: function (Injected) {
|
|
38
|
+
TreeTraversal = Injected;
|
|
39
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
40
|
+
process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
};
|
|
@@ -52,14 +59,15 @@ var validateEventDispatches;
|
|
|
52
59
|
if (process.env.NODE_ENV !== 'production') {
|
|
53
60
|
validateEventDispatches = function (event) {
|
|
54
61
|
var dispatchListeners = event._dispatchListeners;
|
|
55
|
-
var
|
|
62
|
+
var dispatchInstances = event._dispatchInstances;
|
|
56
63
|
|
|
57
64
|
var listenersIsArr = Array.isArray(dispatchListeners);
|
|
58
|
-
var idsIsArr = Array.isArray(dispatchIDs);
|
|
59
|
-
var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0;
|
|
60
65
|
var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
|
|
61
66
|
|
|
62
|
-
|
|
67
|
+
var instancesIsArr = Array.isArray(dispatchInstances);
|
|
68
|
+
var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
|
69
|
+
|
|
70
|
+
process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
|
|
63
71
|
};
|
|
64
72
|
}
|
|
65
73
|
|
|
@@ -68,15 +76,15 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
68
76
|
* @param {SyntheticEvent} event SyntheticEvent to handle
|
|
69
77
|
* @param {boolean} simulated If the event is simulated (changes exn behavior)
|
|
70
78
|
* @param {function} listener Application-level callback
|
|
71
|
-
* @param {
|
|
79
|
+
* @param {*} inst Internal component instance
|
|
72
80
|
*/
|
|
73
|
-
function executeDispatch(event, simulated, listener,
|
|
81
|
+
function executeDispatch(event, simulated, listener, inst) {
|
|
74
82
|
var type = event.type || 'unknown-event';
|
|
75
|
-
event.currentTarget =
|
|
83
|
+
event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
|
|
76
84
|
if (simulated) {
|
|
77
|
-
ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event
|
|
85
|
+
ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
|
|
78
86
|
} else {
|
|
79
|
-
ReactErrorUtils.invokeGuardedCallback(type, listener, event
|
|
87
|
+
ReactErrorUtils.invokeGuardedCallback(type, listener, event);
|
|
80
88
|
}
|
|
81
89
|
event.currentTarget = null;
|
|
82
90
|
}
|
|
@@ -86,7 +94,7 @@ function executeDispatch(event, simulated, listener, domID) {
|
|
|
86
94
|
*/
|
|
87
95
|
function executeDispatchesInOrder(event, simulated) {
|
|
88
96
|
var dispatchListeners = event._dispatchListeners;
|
|
89
|
-
var
|
|
97
|
+
var dispatchInstances = event._dispatchInstances;
|
|
90
98
|
if (process.env.NODE_ENV !== 'production') {
|
|
91
99
|
validateEventDispatches(event);
|
|
92
100
|
}
|
|
@@ -95,14 +103,14 @@ function executeDispatchesInOrder(event, simulated) {
|
|
|
95
103
|
if (event.isPropagationStopped()) {
|
|
96
104
|
break;
|
|
97
105
|
}
|
|
98
|
-
// Listeners and
|
|
99
|
-
executeDispatch(event, simulated, dispatchListeners[i],
|
|
106
|
+
// Listeners and Instances are two parallel arrays that are always in sync.
|
|
107
|
+
executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
|
|
100
108
|
}
|
|
101
109
|
} else if (dispatchListeners) {
|
|
102
|
-
executeDispatch(event, simulated, dispatchListeners,
|
|
110
|
+
executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
|
|
103
111
|
}
|
|
104
112
|
event._dispatchListeners = null;
|
|
105
|
-
event.
|
|
113
|
+
event._dispatchInstances = null;
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
/**
|
|
@@ -114,7 +122,7 @@ function executeDispatchesInOrder(event, simulated) {
|
|
|
114
122
|
*/
|
|
115
123
|
function executeDispatchesInOrderStopAtTrueImpl(event) {
|
|
116
124
|
var dispatchListeners = event._dispatchListeners;
|
|
117
|
-
var
|
|
125
|
+
var dispatchInstances = event._dispatchInstances;
|
|
118
126
|
if (process.env.NODE_ENV !== 'production') {
|
|
119
127
|
validateEventDispatches(event);
|
|
120
128
|
}
|
|
@@ -123,14 +131,14 @@ function executeDispatchesInOrderStopAtTrueImpl(event) {
|
|
|
123
131
|
if (event.isPropagationStopped()) {
|
|
124
132
|
break;
|
|
125
133
|
}
|
|
126
|
-
// Listeners and
|
|
127
|
-
if (dispatchListeners[i](event,
|
|
128
|
-
return
|
|
134
|
+
// Listeners and Instances are two parallel arrays that are always in sync.
|
|
135
|
+
if (dispatchListeners[i](event, dispatchInstances[i])) {
|
|
136
|
+
return dispatchInstances[i];
|
|
129
137
|
}
|
|
130
138
|
}
|
|
131
139
|
} else if (dispatchListeners) {
|
|
132
|
-
if (dispatchListeners(event,
|
|
133
|
-
return
|
|
140
|
+
if (dispatchListeners(event, dispatchInstances)) {
|
|
141
|
+
return dispatchInstances;
|
|
134
142
|
}
|
|
135
143
|
}
|
|
136
144
|
return null;
|
|
@@ -141,7 +149,7 @@ function executeDispatchesInOrderStopAtTrueImpl(event) {
|
|
|
141
149
|
*/
|
|
142
150
|
function executeDispatchesInOrderStopAtTrue(event) {
|
|
143
151
|
var ret = executeDispatchesInOrderStopAtTrueImpl(event);
|
|
144
|
-
event.
|
|
152
|
+
event._dispatchInstances = null;
|
|
145
153
|
event._dispatchListeners = null;
|
|
146
154
|
return ret;
|
|
147
155
|
}
|
|
@@ -160,11 +168,13 @@ function executeDirectDispatch(event) {
|
|
|
160
168
|
validateEventDispatches(event);
|
|
161
169
|
}
|
|
162
170
|
var dispatchListener = event._dispatchListeners;
|
|
163
|
-
var
|
|
164
|
-
!!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) :
|
|
165
|
-
|
|
171
|
+
var dispatchInstance = event._dispatchInstances;
|
|
172
|
+
!!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : void 0;
|
|
173
|
+
event.currentTarget = EventPluginUtils.getNodeFromInstance(dispatchInstance);
|
|
174
|
+
var res = dispatchListener ? dispatchListener(event) : null;
|
|
175
|
+
event.currentTarget = null;
|
|
166
176
|
event._dispatchListeners = null;
|
|
167
|
-
event.
|
|
177
|
+
event._dispatchInstances = null;
|
|
168
178
|
return res;
|
|
169
179
|
}
|
|
170
180
|
|
|
@@ -189,11 +199,26 @@ var EventPluginUtils = {
|
|
|
189
199
|
executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
|
|
190
200
|
hasDispatches: hasDispatches,
|
|
191
201
|
|
|
192
|
-
|
|
193
|
-
return
|
|
202
|
+
getInstanceFromNode: function (node) {
|
|
203
|
+
return ComponentTree.getInstanceFromNode(node);
|
|
204
|
+
},
|
|
205
|
+
getNodeFromInstance: function (node) {
|
|
206
|
+
return ComponentTree.getNodeFromInstance(node);
|
|
207
|
+
},
|
|
208
|
+
isAncestor: function (a, b) {
|
|
209
|
+
return TreeTraversal.isAncestor(a, b);
|
|
210
|
+
},
|
|
211
|
+
getLowestCommonAncestor: function (a, b) {
|
|
212
|
+
return TreeTraversal.getLowestCommonAncestor(a, b);
|
|
213
|
+
},
|
|
214
|
+
getParentInstance: function (inst) {
|
|
215
|
+
return TreeTraversal.getParentInstance(inst);
|
|
216
|
+
},
|
|
217
|
+
traverseTwoPhase: function (target, fn, arg) {
|
|
218
|
+
return TreeTraversal.traverseTwoPhase(target, fn, arg);
|
|
194
219
|
},
|
|
195
|
-
|
|
196
|
-
return
|
|
220
|
+
traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
|
|
221
|
+
return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
|
|
197
222
|
},
|
|
198
223
|
|
|
199
224
|
injection: injection
|
package/lib/EventPropagators.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
var EventConstants = require('./EventConstants');
|
|
15
15
|
var EventPluginHub = require('./EventPluginHub');
|
|
16
|
-
|
|
17
|
-
var warning = require('fbjs/lib/warning');
|
|
16
|
+
var EventPluginUtils = require('./EventPluginUtils');
|
|
18
17
|
|
|
19
18
|
var accumulateInto = require('./accumulateInto');
|
|
20
19
|
var forEachAccumulated = require('./forEachAccumulated');
|
|
20
|
+
var warning = require('fbjs/lib/warning');
|
|
21
21
|
|
|
22
22
|
var PropagationPhases = EventConstants.PropagationPhases;
|
|
23
23
|
var getListener = EventPluginHub.getListener;
|
|
@@ -26,9 +26,9 @@ var getListener = EventPluginHub.getListener;
|
|
|
26
26
|
* Some event types have a notion of different registration names for different
|
|
27
27
|
* "phases" of propagation. This finds listeners by a given phase.
|
|
28
28
|
*/
|
|
29
|
-
function listenerAtPhase(
|
|
29
|
+
function listenerAtPhase(inst, event, propagationPhase) {
|
|
30
30
|
var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
|
31
|
-
return getListener(
|
|
31
|
+
return getListener(inst, registrationName);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -37,15 +37,15 @@ function listenerAtPhase(id, event, propagationPhase) {
|
|
|
37
37
|
* Mutating the event's members allows us to not have to create a wrapping
|
|
38
38
|
* "dispatch" object that pairs the event with the listener.
|
|
39
39
|
*/
|
|
40
|
-
function accumulateDirectionalDispatches(
|
|
40
|
+
function accumulateDirectionalDispatches(inst, upwards, event) {
|
|
41
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
42
|
-
process.env.NODE_ENV !== 'production' ? warning(
|
|
42
|
+
process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
|
|
43
43
|
}
|
|
44
44
|
var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
|
|
45
|
-
var listener = listenerAtPhase(
|
|
45
|
+
var listener = listenerAtPhase(inst, event, phase);
|
|
46
46
|
if (listener) {
|
|
47
47
|
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
|
48
|
-
event.
|
|
48
|
+
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -58,7 +58,7 @@ function accumulateDirectionalDispatches(domID, upwards, event) {
|
|
|
58
58
|
*/
|
|
59
59
|
function accumulateTwoPhaseDispatchesSingle(event) {
|
|
60
60
|
if (event && event.dispatchConfig.phasedRegistrationNames) {
|
|
61
|
-
|
|
61
|
+
EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -67,7 +67,9 @@ function accumulateTwoPhaseDispatchesSingle(event) {
|
|
|
67
67
|
*/
|
|
68
68
|
function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
|
69
69
|
if (event && event.dispatchConfig.phasedRegistrationNames) {
|
|
70
|
-
|
|
70
|
+
var targetInst = event._targetInst;
|
|
71
|
+
var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
|
|
72
|
+
EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -76,13 +78,13 @@ function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
|
|
76
78
|
* registration names. Same as `accumulateDirectDispatchesSingle` but without
|
|
77
79
|
* requiring that the `dispatchMarker` be the same as the dispatched ID.
|
|
78
80
|
*/
|
|
79
|
-
function accumulateDispatches(
|
|
81
|
+
function accumulateDispatches(inst, ignoredDirection, event) {
|
|
80
82
|
if (event && event.dispatchConfig.registrationName) {
|
|
81
83
|
var registrationName = event.dispatchConfig.registrationName;
|
|
82
|
-
var listener = getListener(
|
|
84
|
+
var listener = getListener(inst, registrationName);
|
|
83
85
|
if (listener) {
|
|
84
86
|
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
|
85
|
-
event.
|
|
87
|
+
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
}
|
|
@@ -94,7 +96,7 @@ function accumulateDispatches(id, ignoredDirection, event) {
|
|
|
94
96
|
*/
|
|
95
97
|
function accumulateDirectDispatchesSingle(event) {
|
|
96
98
|
if (event && event.dispatchConfig.registrationName) {
|
|
97
|
-
accumulateDispatches(event.
|
|
99
|
+
accumulateDispatches(event._targetInst, null, event);
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
|
|
@@ -106,8 +108,8 @@ function accumulateTwoPhaseDispatchesSkipTarget(events) {
|
|
|
106
108
|
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
function accumulateEnterLeaveDispatches(leave, enter,
|
|
110
|
-
|
|
111
|
+
function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
|
112
|
+
EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
function accumulateDirectDispatches(events) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*
|
|
9
9
|
* @providesModule FallbackCompositionState
|
|
10
|
-
* @typechecks static-only
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
'use strict';
|
|
14
13
|
|
|
14
|
+
var _assign = require('object-assign');
|
|
15
|
+
|
|
15
16
|
var PooledClass = require('./PooledClass');
|
|
16
17
|
|
|
17
|
-
var assign = require('./Object.assign');
|
|
18
18
|
var getTextContentAccessor = require('./getTextContentAccessor');
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -34,7 +34,7 @@ function FallbackCompositionState(root) {
|
|
|
34
34
|
this._fallbackText = null;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
_assign(FallbackCompositionState.prototype, {
|
|
38
38
|
destructor: function () {
|
|
39
39
|
this._root = null;
|
|
40
40
|
this._startText = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, 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,9 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
var DOMProperty = require('./DOMProperty');
|
|
15
|
-
var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
|
|
16
15
|
|
|
17
|
-
var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
|
|
18
16
|
var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
|
|
19
17
|
var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
|
|
20
18
|
var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
|
|
@@ -22,188 +20,182 @@ var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
|
|
|
22
20
|
var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
|
|
23
21
|
var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
|
24
22
|
|
|
25
|
-
var hasSVG;
|
|
26
|
-
if (ExecutionEnvironment.canUseDOM) {
|
|
27
|
-
var implementation = document.implementation;
|
|
28
|
-
hasSVG = implementation && implementation.hasFeature && implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
23
|
var HTMLDOMPropertyConfig = {
|
|
32
|
-
isCustomAttribute: RegExp.prototype.test.bind(
|
|
24
|
+
isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
|
|
33
25
|
Properties: {
|
|
34
26
|
/**
|
|
35
27
|
* Standard Properties
|
|
36
28
|
*/
|
|
37
|
-
accept:
|
|
38
|
-
acceptCharset:
|
|
39
|
-
accessKey:
|
|
40
|
-
action:
|
|
41
|
-
allowFullScreen:
|
|
42
|
-
allowTransparency:
|
|
43
|
-
alt:
|
|
29
|
+
accept: 0,
|
|
30
|
+
acceptCharset: 0,
|
|
31
|
+
accessKey: 0,
|
|
32
|
+
action: 0,
|
|
33
|
+
allowFullScreen: HAS_BOOLEAN_VALUE,
|
|
34
|
+
allowTransparency: 0,
|
|
35
|
+
alt: 0,
|
|
44
36
|
async: HAS_BOOLEAN_VALUE,
|
|
45
|
-
autoComplete:
|
|
37
|
+
autoComplete: 0,
|
|
46
38
|
// autoFocus is polyfilled/normalized by AutoFocusUtils
|
|
47
39
|
// autoFocus: HAS_BOOLEAN_VALUE,
|
|
48
40
|
autoPlay: HAS_BOOLEAN_VALUE,
|
|
49
|
-
capture:
|
|
50
|
-
cellPadding:
|
|
51
|
-
cellSpacing:
|
|
52
|
-
charSet:
|
|
53
|
-
challenge:
|
|
41
|
+
capture: HAS_BOOLEAN_VALUE,
|
|
42
|
+
cellPadding: 0,
|
|
43
|
+
cellSpacing: 0,
|
|
44
|
+
charSet: 0,
|
|
45
|
+
challenge: 0,
|
|
54
46
|
checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
coords: null,
|
|
69
|
-
crossOrigin: null,
|
|
70
|
-
data: null, // For `<object />` acts as `src`.
|
|
71
|
-
dateTime: MUST_USE_ATTRIBUTE,
|
|
47
|
+
cite: 0,
|
|
48
|
+
classID: 0,
|
|
49
|
+
className: 0,
|
|
50
|
+
cols: HAS_POSITIVE_NUMERIC_VALUE,
|
|
51
|
+
colSpan: 0,
|
|
52
|
+
content: 0,
|
|
53
|
+
contentEditable: 0,
|
|
54
|
+
contextMenu: 0,
|
|
55
|
+
controls: HAS_BOOLEAN_VALUE,
|
|
56
|
+
coords: 0,
|
|
57
|
+
crossOrigin: 0,
|
|
58
|
+
data: 0, // For `<object />` acts as `src`.
|
|
59
|
+
dateTime: 0,
|
|
72
60
|
'default': HAS_BOOLEAN_VALUE,
|
|
73
61
|
defer: HAS_BOOLEAN_VALUE,
|
|
74
|
-
dir:
|
|
75
|
-
disabled:
|
|
62
|
+
dir: 0,
|
|
63
|
+
disabled: HAS_BOOLEAN_VALUE,
|
|
76
64
|
download: HAS_OVERLOADED_BOOLEAN_VALUE,
|
|
77
|
-
draggable:
|
|
78
|
-
encType:
|
|
79
|
-
form:
|
|
80
|
-
formAction:
|
|
81
|
-
formEncType:
|
|
82
|
-
formMethod:
|
|
65
|
+
draggable: 0,
|
|
66
|
+
encType: 0,
|
|
67
|
+
form: 0,
|
|
68
|
+
formAction: 0,
|
|
69
|
+
formEncType: 0,
|
|
70
|
+
formMethod: 0,
|
|
83
71
|
formNoValidate: HAS_BOOLEAN_VALUE,
|
|
84
|
-
formTarget:
|
|
85
|
-
frameBorder:
|
|
86
|
-
headers:
|
|
87
|
-
height:
|
|
88
|
-
hidden:
|
|
89
|
-
high:
|
|
90
|
-
href:
|
|
91
|
-
hrefLang:
|
|
92
|
-
htmlFor:
|
|
93
|
-
httpEquiv:
|
|
94
|
-
icon:
|
|
95
|
-
id:
|
|
96
|
-
inputMode:
|
|
97
|
-
integrity:
|
|
98
|
-
is:
|
|
99
|
-
keyParams:
|
|
100
|
-
keyType:
|
|
101
|
-
kind:
|
|
102
|
-
label:
|
|
103
|
-
lang:
|
|
104
|
-
list:
|
|
105
|
-
loop:
|
|
106
|
-
low:
|
|
107
|
-
manifest:
|
|
108
|
-
marginHeight:
|
|
109
|
-
marginWidth:
|
|
110
|
-
max:
|
|
111
|
-
maxLength:
|
|
112
|
-
media:
|
|
113
|
-
mediaGroup:
|
|
114
|
-
method:
|
|
115
|
-
min:
|
|
116
|
-
minLength:
|
|
72
|
+
formTarget: 0,
|
|
73
|
+
frameBorder: 0,
|
|
74
|
+
headers: 0,
|
|
75
|
+
height: 0,
|
|
76
|
+
hidden: HAS_BOOLEAN_VALUE,
|
|
77
|
+
high: 0,
|
|
78
|
+
href: 0,
|
|
79
|
+
hrefLang: 0,
|
|
80
|
+
htmlFor: 0,
|
|
81
|
+
httpEquiv: 0,
|
|
82
|
+
icon: 0,
|
|
83
|
+
id: 0,
|
|
84
|
+
inputMode: 0,
|
|
85
|
+
integrity: 0,
|
|
86
|
+
is: 0,
|
|
87
|
+
keyParams: 0,
|
|
88
|
+
keyType: 0,
|
|
89
|
+
kind: 0,
|
|
90
|
+
label: 0,
|
|
91
|
+
lang: 0,
|
|
92
|
+
list: 0,
|
|
93
|
+
loop: HAS_BOOLEAN_VALUE,
|
|
94
|
+
low: 0,
|
|
95
|
+
manifest: 0,
|
|
96
|
+
marginHeight: 0,
|
|
97
|
+
marginWidth: 0,
|
|
98
|
+
max: 0,
|
|
99
|
+
maxLength: 0,
|
|
100
|
+
media: 0,
|
|
101
|
+
mediaGroup: 0,
|
|
102
|
+
method: 0,
|
|
103
|
+
min: 0,
|
|
104
|
+
minLength: 0,
|
|
105
|
+
// Caution; `option.selected` is not updated if `select.multiple` is
|
|
106
|
+
// disabled with `removeAttribute`.
|
|
117
107
|
multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
118
108
|
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
119
|
-
name:
|
|
120
|
-
nonce:
|
|
109
|
+
name: 0,
|
|
110
|
+
nonce: 0,
|
|
121
111
|
noValidate: HAS_BOOLEAN_VALUE,
|
|
122
112
|
open: HAS_BOOLEAN_VALUE,
|
|
123
|
-
optimum:
|
|
124
|
-
pattern:
|
|
125
|
-
placeholder:
|
|
126
|
-
poster:
|
|
127
|
-
preload:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
113
|
+
optimum: 0,
|
|
114
|
+
pattern: 0,
|
|
115
|
+
placeholder: 0,
|
|
116
|
+
poster: 0,
|
|
117
|
+
preload: 0,
|
|
118
|
+
profile: 0,
|
|
119
|
+
radioGroup: 0,
|
|
120
|
+
readOnly: HAS_BOOLEAN_VALUE,
|
|
121
|
+
rel: 0,
|
|
131
122
|
required: HAS_BOOLEAN_VALUE,
|
|
132
123
|
reversed: HAS_BOOLEAN_VALUE,
|
|
133
|
-
role:
|
|
134
|
-
rows:
|
|
135
|
-
rowSpan:
|
|
136
|
-
sandbox:
|
|
137
|
-
scope:
|
|
124
|
+
role: 0,
|
|
125
|
+
rows: HAS_POSITIVE_NUMERIC_VALUE,
|
|
126
|
+
rowSpan: HAS_NUMERIC_VALUE,
|
|
127
|
+
sandbox: 0,
|
|
128
|
+
scope: 0,
|
|
138
129
|
scoped: HAS_BOOLEAN_VALUE,
|
|
139
|
-
scrolling:
|
|
140
|
-
seamless:
|
|
130
|
+
scrolling: 0,
|
|
131
|
+
seamless: HAS_BOOLEAN_VALUE,
|
|
141
132
|
selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
142
|
-
shape:
|
|
143
|
-
size:
|
|
144
|
-
sizes:
|
|
133
|
+
shape: 0,
|
|
134
|
+
size: HAS_POSITIVE_NUMERIC_VALUE,
|
|
135
|
+
sizes: 0,
|
|
145
136
|
span: HAS_POSITIVE_NUMERIC_VALUE,
|
|
146
|
-
spellCheck:
|
|
147
|
-
src:
|
|
148
|
-
srcDoc:
|
|
149
|
-
srcLang:
|
|
150
|
-
srcSet:
|
|
137
|
+
spellCheck: 0,
|
|
138
|
+
src: 0,
|
|
139
|
+
srcDoc: 0,
|
|
140
|
+
srcLang: 0,
|
|
141
|
+
srcSet: 0,
|
|
151
142
|
start: HAS_NUMERIC_VALUE,
|
|
152
|
-
step:
|
|
153
|
-
style:
|
|
154
|
-
summary:
|
|
155
|
-
tabIndex:
|
|
156
|
-
target:
|
|
157
|
-
title:
|
|
158
|
-
type
|
|
159
|
-
|
|
143
|
+
step: 0,
|
|
144
|
+
style: 0,
|
|
145
|
+
summary: 0,
|
|
146
|
+
tabIndex: 0,
|
|
147
|
+
target: 0,
|
|
148
|
+
title: 0,
|
|
149
|
+
// Setting .type throws on non-<input> tags
|
|
150
|
+
type: 0,
|
|
151
|
+
useMap: 0,
|
|
160
152
|
value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
|
|
161
|
-
width:
|
|
162
|
-
wmode:
|
|
163
|
-
wrap:
|
|
153
|
+
width: 0,
|
|
154
|
+
wmode: 0,
|
|
155
|
+
wrap: 0,
|
|
164
156
|
|
|
165
157
|
/**
|
|
166
158
|
* RDFa Properties
|
|
167
159
|
*/
|
|
168
|
-
about:
|
|
169
|
-
datatype:
|
|
170
|
-
inlist:
|
|
171
|
-
prefix:
|
|
160
|
+
about: 0,
|
|
161
|
+
datatype: 0,
|
|
162
|
+
inlist: 0,
|
|
163
|
+
prefix: 0,
|
|
172
164
|
// property is also supported for OpenGraph in meta tags.
|
|
173
|
-
property:
|
|
174
|
-
resource:
|
|
175
|
-
'typeof':
|
|
176
|
-
vocab:
|
|
165
|
+
property: 0,
|
|
166
|
+
resource: 0,
|
|
167
|
+
'typeof': 0,
|
|
168
|
+
vocab: 0,
|
|
177
169
|
|
|
178
170
|
/**
|
|
179
171
|
* Non-standard Properties
|
|
180
172
|
*/
|
|
181
173
|
// autoCapitalize and autoCorrect are supported in Mobile Safari for
|
|
182
174
|
// keyboard hints.
|
|
183
|
-
autoCapitalize:
|
|
184
|
-
autoCorrect:
|
|
175
|
+
autoCapitalize: 0,
|
|
176
|
+
autoCorrect: 0,
|
|
185
177
|
// autoSave allows WebKit/Blink to persist values of input fields on page reloads
|
|
186
|
-
autoSave:
|
|
178
|
+
autoSave: 0,
|
|
187
179
|
// color is for Safari mask-icon link
|
|
188
|
-
color:
|
|
180
|
+
color: 0,
|
|
189
181
|
// itemProp, itemScope, itemType are for
|
|
190
182
|
// Microdata support. See http://schema.org/docs/gs.html
|
|
191
|
-
itemProp:
|
|
192
|
-
itemScope:
|
|
193
|
-
itemType:
|
|
183
|
+
itemProp: 0,
|
|
184
|
+
itemScope: HAS_BOOLEAN_VALUE,
|
|
185
|
+
itemType: 0,
|
|
194
186
|
// itemID and itemRef are for Microdata support as well but
|
|
195
|
-
// only specified in the
|
|
187
|
+
// only specified in the WHATWG spec document. See
|
|
196
188
|
// https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
|
|
197
|
-
itemID:
|
|
198
|
-
itemRef:
|
|
189
|
+
itemID: 0,
|
|
190
|
+
itemRef: 0,
|
|
199
191
|
// results show looking glass icon and recent searches on input
|
|
200
192
|
// search fields in WebKit/Blink
|
|
201
|
-
results:
|
|
193
|
+
results: 0,
|
|
202
194
|
// IE-only attribute that specifies security restrictions on an iframe
|
|
203
195
|
// as an alternative to the sandbox attribute on IE<10
|
|
204
|
-
security:
|
|
196
|
+
security: 0,
|
|
205
197
|
// IE-only attribute that controls focus behavior
|
|
206
|
-
unselectable:
|
|
198
|
+
unselectable: 0
|
|
207
199
|
},
|
|
208
200
|
DOMAttributeNames: {
|
|
209
201
|
acceptCharset: 'accept-charset',
|
|
@@ -211,20 +203,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
211
203
|
htmlFor: 'for',
|
|
212
204
|
httpEquiv: 'http-equiv'
|
|
213
205
|
},
|
|
214
|
-
DOMPropertyNames: {
|
|
215
|
-
autoComplete: 'autocomplete',
|
|
216
|
-
autoFocus: 'autofocus',
|
|
217
|
-
autoPlay: 'autoplay',
|
|
218
|
-
autoSave: 'autosave',
|
|
219
|
-
// `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
|
|
220
|
-
// http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
|
|
221
|
-
encType: 'encoding',
|
|
222
|
-
hrefLang: 'hreflang',
|
|
223
|
-
radioGroup: 'radiogroup',
|
|
224
|
-
spellCheck: 'spellcheck',
|
|
225
|
-
srcDoc: 'srcdoc',
|
|
226
|
-
srcSet: 'srcset'
|
|
227
|
-
}
|
|
206
|
+
DOMPropertyNames: {}
|
|
228
207
|
};
|
|
229
208
|
|
|
230
209
|
module.exports = HTMLDOMPropertyConfig;
|