(type, props)
| 15814 | } |
| 15815 | |
| 15816 | function warnInvalidARIAProps(type, props) { |
| 15817 | var invalidProps = []; |
| 15818 | |
| 15819 | for (var key in props) { |
| 15820 | var isValid = validateProperty(type, key); |
| 15821 | if (!isValid) { |
| 15822 | invalidProps.push(key); |
| 15823 | } |
| 15824 | } |
| 15825 | |
| 15826 | var unknownPropString = invalidProps.map(function (prop) { |
| 15827 | return '`' + prop + '`'; |
| 15828 | }).join(', '); |
| 15829 | |
| 15830 | if (invalidProps.length === 1) { |
| 15831 | warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15832 | } else if (invalidProps.length > 1) { |
| 15833 | warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15834 | } |
| 15835 | } |
| 15836 | |
| 15837 | function validateProperties(type, props) { |
| 15838 | if (isCustomComponent(type, props)) { |
no test coverage detected