(name, value, propertyInfo, isCustomComponentTag)
| 4311 | } |
| 4312 | |
| 4313 | function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { |
| 4314 | if (propertyInfo !== null && propertyInfo.type === RESERVED) { |
| 4315 | return false; |
| 4316 | } |
| 4317 | switch (typeof value) { |
| 4318 | case 'function': |
| 4319 | // $FlowIssue symbol is perfectly valid here |
| 4320 | case 'symbol': |
| 4321 | // eslint-disable-line |
| 4322 | return true; |
| 4323 | case 'boolean': |
| 4324 | { |
| 4325 | if (isCustomComponentTag) { |
| 4326 | return false; |
| 4327 | } |
| 4328 | if (propertyInfo !== null) { |
| 4329 | return !propertyInfo.acceptsBooleans; |
| 4330 | } else { |
| 4331 | var prefix = name.toLowerCase().slice(0, 5); |
| 4332 | return prefix !== 'data-' && prefix !== 'aria-'; |
| 4333 | } |
| 4334 | } |
| 4335 | default: |
| 4336 | return false; |
| 4337 | } |
| 4338 | } |
| 4339 | |
| 4340 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 4341 | if (value === null || typeof value === 'undefined') { |
no outgoing calls
no test coverage detected