(tagName, props)
| 15407 | } |
| 15408 | |
| 15409 | function isCustomComponent(tagName, props) { |
| 15410 | if (tagName.indexOf('-') === -1) { |
| 15411 | return typeof props.is === 'string'; |
| 15412 | } |
| 15413 | switch (tagName) { |
| 15414 | // These are reserved SVG and MathML elements. |
| 15415 | // We don't mind this whitelist too much because we expect it to never grow. |
| 15416 | // The alternative is to track the namespace in a few places which is convoluted. |
| 15417 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 15418 | case 'annotation-xml': |
| 15419 | case 'color-profile': |
| 15420 | case 'font-face': |
| 15421 | case 'font-face-src': |
| 15422 | case 'font-face-uri': |
| 15423 | case 'font-face-format': |
| 15424 | case 'font-face-name': |
| 15425 | case 'missing-glyph': |
| 15426 | return false; |
| 15427 | default: |
| 15428 | return true; |
| 15429 | } |
| 15430 | } |
| 15431 | |
| 15432 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 15433 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected