(type, props)
| 5514 | } |
| 5515 | |
| 5516 | function warnInvalidARIAProps(type, props) { |
| 5517 | { |
| 5518 | var invalidProps = []; |
| 5519 | |
| 5520 | for (var key in props) { |
| 5521 | var isValid = validateProperty(type, key); |
| 5522 | |
| 5523 | if (!isValid) { |
| 5524 | invalidProps.push(key); |
| 5525 | } |
| 5526 | } |
| 5527 | |
| 5528 | var unknownPropString = invalidProps.map(function (prop) { |
| 5529 | return '`' + prop + '`'; |
| 5530 | }).join(', '); |
| 5531 | |
| 5532 | if (invalidProps.length === 1) { |
| 5533 | error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); |
| 5534 | } else if (invalidProps.length > 1) { |
| 5535 | error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); |
| 5536 | } |
| 5537 | } |
| 5538 | } |
| 5539 | |
| 5540 | function validateProperties(type, props) { |
| 5541 | if (isCustomComponent(type, props)) { |
no test coverage detected