(type, props)
| 15779 | } |
| 15780 | |
| 15781 | function warnInvalidARIAProps(type, props) { |
| 15782 | var invalidProps = []; |
| 15783 | |
| 15784 | for (var key in props) { |
| 15785 | var isValid = validateProperty(type, key); |
| 15786 | if (!isValid) { |
| 15787 | invalidProps.push(key); |
| 15788 | } |
| 15789 | } |
| 15790 | |
| 15791 | var unknownPropString = invalidProps.map(function (prop) { |
| 15792 | return '`' + prop + '`'; |
| 15793 | }).join(', '); |
| 15794 | |
| 15795 | if (invalidProps.length === 1) { |
| 15796 | warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15797 | } else if (invalidProps.length > 1) { |
| 15798 | warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15799 | } |
| 15800 | } |
| 15801 | |
| 15802 | function validateProperties(type, props) { |
| 15803 | if (isCustomComponent(type, props)) { |
no test coverage detected