(type, props)
| 15872 | } |
| 15873 | |
| 15874 | function warnInvalidARIAProps(type, props) { |
| 15875 | var invalidProps = []; |
| 15876 | |
| 15877 | for (var key in props) { |
| 15878 | var isValid = validateProperty(type, key); |
| 15879 | if (!isValid) { |
| 15880 | invalidProps.push(key); |
| 15881 | } |
| 15882 | } |
| 15883 | |
| 15884 | var unknownPropString = invalidProps.map(function (prop) { |
| 15885 | return '`' + prop + '`'; |
| 15886 | }).join(', '); |
| 15887 | |
| 15888 | if (invalidProps.length === 1) { |
| 15889 | warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15890 | } else if (invalidProps.length > 1) { |
| 15891 | warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15892 | } |
| 15893 | } |
| 15894 | |
| 15895 | function validateProperties(type, props) { |
| 15896 | if (isCustomComponent(type, props)) { |
no test coverage detected