(type, props)
| 15109 | } |
| 15110 | |
| 15111 | function warnInvalidARIAProps(type, props) { |
| 15112 | var invalidProps = []; |
| 15113 | |
| 15114 | for (var key in props) { |
| 15115 | var isValid = validateProperty(type, key); |
| 15116 | if (!isValid) { |
| 15117 | invalidProps.push(key); |
| 15118 | } |
| 15119 | } |
| 15120 | |
| 15121 | var unknownPropString = invalidProps.map(function (prop) { |
| 15122 | return '`' + prop + '`'; |
| 15123 | }).join(', '); |
| 15124 | |
| 15125 | if (invalidProps.length === 1) { |
| 15126 | warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15127 | } else if (invalidProps.length > 1) { |
| 15128 | warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15129 | } |
| 15130 | } |
| 15131 | |
| 15132 | function validateProperties(type, props) { |
| 15133 | if (isCustomComponent(type, props)) { |
no test coverage detected