(type, props)
| 15140 | } |
| 15141 | |
| 15142 | function warnInvalidARIAProps(type, props) { |
| 15143 | var invalidProps = []; |
| 15144 | |
| 15145 | for (var key in props) { |
| 15146 | var isValid = validateProperty(type, key); |
| 15147 | if (!isValid) { |
| 15148 | invalidProps.push(key); |
| 15149 | } |
| 15150 | } |
| 15151 | |
| 15152 | var unknownPropString = invalidProps.map(function (prop) { |
| 15153 | return '`' + prop + '`'; |
| 15154 | }).join(', '); |
| 15155 | |
| 15156 | if (invalidProps.length === 1) { |
| 15157 | warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15158 | } else if (invalidProps.length > 1) { |
| 15159 | warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15160 | } |
| 15161 | } |
| 15162 | |
| 15163 | function validateProperties(type, props) { |
| 15164 | if (isCustomComponent(type, props)) { |
no test coverage detected