(tagName, props)
| 4886 | } |
| 4887 | |
| 4888 | function isCustomComponent(tagName, props) { |
| 4889 | if (tagName.indexOf('-') === -1) { |
| 4890 | return typeof props.is === 'string'; |
| 4891 | } |
| 4892 | |
| 4893 | switch (tagName) { |
| 4894 | // These are reserved SVG and MathML elements. |
| 4895 | // We don't mind this whitelist too much because we expect it to never grow. |
| 4896 | // The alternative is to track the namespace in a few places which is convoluted. |
| 4897 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 4898 | case 'annotation-xml': |
| 4899 | case 'color-profile': |
| 4900 | case 'font-face': |
| 4901 | case 'font-face-src': |
| 4902 | case 'font-face-uri': |
| 4903 | case 'font-face-format': |
| 4904 | case 'font-face-name': |
| 4905 | case 'missing-glyph': |
| 4906 | return false; |
| 4907 | |
| 4908 | default: |
| 4909 | return true; |
| 4910 | } |
| 4911 | } |
| 4912 | |
| 4913 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 4914 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected