(tagName, props)
| 14480 | } |
| 14481 | |
| 14482 | function isCustomComponent(tagName, props) { |
| 14483 | if (tagName.indexOf('-') === -1) { |
| 14484 | return typeof props.is === 'string'; |
| 14485 | } |
| 14486 | switch (tagName) { |
| 14487 | // These are reserved SVG and MathML elements. |
| 14488 | // We don't mind this whitelist too much because we expect it to never grow. |
| 14489 | // The alternative is to track the namespace in a few places which is convoluted. |
| 14490 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 14491 | case 'annotation-xml': |
| 14492 | case 'color-profile': |
| 14493 | case 'font-face': |
| 14494 | case 'font-face-src': |
| 14495 | case 'font-face-uri': |
| 14496 | case 'font-face-format': |
| 14497 | case 'font-face-name': |
| 14498 | case 'missing-glyph': |
| 14499 | return false; |
| 14500 | default: |
| 14501 | return true; |
| 14502 | } |
| 14503 | } |
| 14504 | |
| 14505 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 14506 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected