66var utilities = require ( './utilities' ) ;
77
88// HTML and SVG DOM Property Configs
9- var HTMLDOMPropertyConfig = require ( 'react-dom/lib/HTMLDOMPropertyConfig' ) ;
10- var SVGDOMPropertyConfig = require ( 'react-dom/lib/SVGDOMPropertyConfig' ) ;
9+ var HTMLDOMPropertyConfig = require ( 'react-dom-core /lib/HTMLDOMPropertyConfig' ) ;
10+ var SVGDOMPropertyConfig = require ( 'react-dom-core /lib/SVGDOMPropertyConfig' ) ;
1111
1212var config = {
1313 html : { } ,
@@ -18,44 +18,42 @@ var propertyName;
1818
1919/**
2020 * HTML DOM property config.
21+ * https://github.com/facebook/react/blob/master/src/renderers/dom/shared/HTMLDOMPropertyConfig.js
2122 */
2223
23- // first map out the HTML DOM attribute names
24+ // first map out the HTML attribute names
2425// e.g., { className: 'class' } => { 'class': 'className' }
25- // https://github.com/facebook/react/blob/master/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L204
2626config . html = utilities . invertObject (
2727 HTMLDOMPropertyConfig . DOMAttributeNames
2828) ;
2929
30- // then map out the rest of the HTML DOM properties
31- // e.g., { charSet: 0 } => { charset: 'charSet' }
32- // https://github.com/facebook/react/blob/master/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L28
30+ // then map out the rest of the HTML properties
31+ // e.g., { readOnly: 0 } => { readonly: 'readOnly' }
3332for ( propertyName in HTMLDOMPropertyConfig . Properties ) {
3433 // lowercase to make matching property names easier
3534 config . html [ propertyName . toLowerCase ( ) ] = propertyName ;
3635}
3736
3837/**
3938 * SVG DOM property config.
39+ * https://github.com/facebook/react/blob/master/src/renderers/dom/shared/SVGDOMPropertyConfig.js
4040 */
4141
42- // first map out the SVG DOM attribute names
42+ // first map out the SVG attribute names
4343// e.g., { fontSize: 'font-size' } => { 'font-size': 'fontSize' }
44- // https://github.com/facebook/react/blob/master/src/renderers/dom/shared/SVGDOMPropertyConfig.js#L36
4544config . svg = utilities . invertObject (
4645 SVGDOMPropertyConfig . DOMAttributeNames
4746) ;
4847
49- // then map out the rest of the SVG DOM properties
50- // e.g., { preserveAlpha: 0 } => { preserveAlpha: 'preserveAlpha' }
51- // https://github.com/facebook/react/blob/master/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L28
48+ // then map out the rest of the SVG properties
49+ // e.g., { fillRule: 0 } => { fillRule: 'fillRule' }
5250for ( propertyName in SVGDOMPropertyConfig . Properties ) {
5351 // do not lowercase as some svg properties are camel cased
5452 config . html [ propertyName ] = propertyName ;
5553}
5654
5755/**
58- * Export React property configs.
56+ * Export property configs.
5957 */
6058module . exports = {
6159 config : config ,
0 commit comments