@@ -72,6 +72,13 @@ const attributes = [];
7272 */
7373const booleanProperties = [ 'autoFocus' ] ;
7474
75+ /**
76+ * HTML attributes that behave like booleans but can also accept a string value.
77+ *
78+ * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/DOMProperty.js#L190-L193
79+ */
80+ const overloadedBooleanProperties = [ ] ;
81+
7582Object . keys ( DOMProperty . getPossibleStandardName ) . forEach ( attributeName => {
7683 const propertyName = DOMProperty . getPossibleStandardName [ attributeName ] ;
7784
@@ -81,8 +88,12 @@ Object.keys(DOMProperty.getPossibleStandardName).forEach(attributeName => {
8188
8289 const property = DOMProperty . properties [ propertyName ] ;
8390
84- if ( property && property . hasBooleanValue ) {
85- booleanProperties . push ( propertyName ) ;
91+ if ( property ) {
92+ if ( property . hasBooleanValue ) {
93+ booleanProperties . push ( propertyName ) ;
94+ } else if ( property . hasOverloadedBooleanValue ) {
95+ overloadedBooleanProperties . push ( propertyName ) ;
96+ }
8697 }
8798
8899 attributes . push ( attributeName ) ;
@@ -102,3 +113,8 @@ fs.writeFileSync(
102113 path . resolve ( HTML_DIR , 'boolean-properties.json' ) ,
103114 JSON . stringify ( booleanProperties )
104115) ;
116+
117+ fs . writeFileSync (
118+ path . resolve ( HTML_DIR , 'overloaded-boolean-properties.json' ) ,
119+ JSON . stringify ( overloadedBooleanProperties )
120+ ) ;
0 commit comments