(tagName, props)
| 8458 | } |
| 8459 | |
| 8460 | function isCustomComponent(tagName, props) { |
| 8461 | if (tagName.indexOf('-') === -1) { |
| 8462 | return typeof props.is === 'string'; |
| 8463 | } |
| 8464 | |
| 8465 | switch (tagName) { |
| 8466 | // These are reserved SVG and MathML elements. |
| 8467 | // We don't mind this whitelist too much because we expect it to never grow. |
| 8468 | // The alternative is to track the namespace in a few places which is convoluted. |
| 8469 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 8470 | case 'annotation-xml': |
| 8471 | case 'color-profile': |
| 8472 | case 'font-face': |
| 8473 | case 'font-face-src': |
| 8474 | case 'font-face-uri': |
| 8475 | case 'font-face-format': |
| 8476 | case 'font-face-name': |
| 8477 | case 'missing-glyph': |
| 8478 | return false; |
| 8479 | |
| 8480 | default: |
| 8481 | return true; |
| 8482 | } |
| 8483 | } |
| 8484 | |
| 8485 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 8486 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected