(type, props)
| 15917 | } |
| 15918 | |
| 15919 | function warnInvalidARIAProps(type, props) { |
| 15920 | var invalidProps = []; |
| 15921 | |
| 15922 | for (var key in props) { |
| 15923 | var isValid = validateProperty(type, key); |
| 15924 | if (!isValid) { |
| 15925 | invalidProps.push(key); |
| 15926 | } |
| 15927 | } |
| 15928 | |
| 15929 | var unknownPropString = invalidProps.map(function (prop) { |
| 15930 | return '`' + prop + '`'; |
| 15931 | }).join(', '); |
| 15932 | |
| 15933 | if (invalidProps.length === 1) { |
| 15934 | warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15935 | } else if (invalidProps.length > 1) { |
| 15936 | warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15937 | } |
| 15938 | } |
| 15939 | |
| 15940 | function validateProperties(type, props) { |
| 15941 | if (isCustomComponent(type, props)) { |
no test coverage detected