40
var inputValueTracking = require('inputValueTracking');
41
var validateDOMNesting = require('validateDOMNesting');
42
var warning = require('warning');
43
+var didWarnShadyDOM = false;
44
45
var Flags = ReactDOMComponentFlags;
46
var deleteListener = EventPluginHub.deleteListener;
633
type
634
);
635
}
636
+ var isCustomComponentTag = isCustomComponent(this._tag, props);
637
+ if (__DEV__ && isCustomComponentTag && !didWarnShadyDOM && el.shadyRoot) {
638
+ var owner = this._currentElement._owner;
639
+ var name = owner && owner.getName() || 'A component';
640
+ warning(
641
+ false,
642
+ '%s is using shady DOM. Using shady DOM with React can ' +
643
+ 'cause things to break subtly.',
644
+ name
645
+ );
646
+ didWarnShadyDOM = true;
647
+ }
648
ReactDOMComponentTree.precacheNode(this, el);
649
this._flags |= Flags.hasCachedChildNodes;
650
if (!this._hostParent) {
651
DOMPropertyOperations.setAttributeForRoot(el);
652
}
640
- this._updateDOMProperties(null, props, transaction);
653
+ this._updateDOMProperties(null, props, transaction, isCustomComponentTag);
654
var lazyTree = DOMLazyTree(el);
655
this._createInitialChildren(transaction, props, context, lazyTree);
656
mountImage = lazyTree;
914
}
915
916
assertValidProps(this, nextProps);
904
- this._updateDOMProperties(lastProps, nextProps, transaction);
917
+ var isCustomComponentTag = isCustomComponent(this._tag, nextProps);
918
+ this._updateDOMProperties(lastProps, nextProps, transaction, isCustomComponentTag);
919
this._updateDOMChildren(
920
lastProps,
921
nextProps,
957
* @param {object} nextProps
958
* @param {?DOMElement} node
959
*/
946
- _updateDOMProperties: function(lastProps, nextProps, transaction) {
960
+ _updateDOMProperties: function(
961
+ lastProps,
962
+ nextProps,
963
+ transaction,
964
+ isCustomComponentTag
965
+ ) {
966
var propKey;
967
var styleName;
968
var styleUpdates;
1052
} else if (lastProp) {
1053
deleteListener(this, propKey);
1054
}
1036
- } else if (isCustomComponent(this._tag, nextProps)) {
1055
+ } else if (isCustomComponentTag) {
1056
if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
1057
DOMPropertyOperations.setValueForAttribute(
1058
getNode(this),