(type, props)
| 9086 | } |
| 9087 | |
| 9088 | function warnInvalidARIAProps(type, props) { |
| 9089 | { |
| 9090 | var invalidProps = []; |
| 9091 | |
| 9092 | for (var key in props) { |
| 9093 | var isValid = validateProperty(type, key); |
| 9094 | |
| 9095 | if (!isValid) { |
| 9096 | invalidProps.push(key); |
| 9097 | } |
| 9098 | } |
| 9099 | |
| 9100 | var unknownPropString = invalidProps.map(function (prop) { |
| 9101 | return '`' + prop + '`'; |
| 9102 | }).join(', '); |
| 9103 | |
| 9104 | if (invalidProps.length === 1) { |
| 9105 | error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); |
| 9106 | } else if (invalidProps.length > 1) { |
| 9107 | error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); |
| 9108 | } |
| 9109 | } |
| 9110 | } |
| 9111 | |
| 9112 | function validateProperties(type, props) { |
| 9113 | if (isCustomComponent(type, props)) { |
no test coverage detected