(tagName, props)
| 14389 | } |
| 14390 | |
| 14391 | function isCustomComponent(tagName, props) { |
| 14392 | if (tagName.indexOf('-') === -1) { |
| 14393 | return typeof props.is === 'string'; |
| 14394 | } |
| 14395 | switch (tagName) { |
| 14396 | // These are reserved SVG and MathML elements. |
| 14397 | // We don't mind this whitelist too much because we expect it to never grow. |
| 14398 | // The alternative is to track the namespace in a few places which is convoluted. |
| 14399 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 14400 | case 'annotation-xml': |
| 14401 | case 'color-profile': |
| 14402 | case 'font-face': |
| 14403 | case 'font-face-src': |
| 14404 | case 'font-face-uri': |
| 14405 | case 'font-face-format': |
| 14406 | case 'font-face-name': |
| 14407 | case 'missing-glyph': |
| 14408 | return false; |
| 14409 | default: |
| 14410 | return true; |
| 14411 | } |
| 14412 | } |
| 14413 | |
| 14414 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 14415 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected