(tagName, props)
| 15029 | } |
| 15030 | |
| 15031 | function isCustomComponent(tagName, props) { |
| 15032 | if (tagName.indexOf('-') === -1) { |
| 15033 | return typeof props.is === 'string'; |
| 15034 | } |
| 15035 | switch (tagName) { |
| 15036 | // These are reserved SVG and MathML elements. |
| 15037 | // We don't mind this whitelist too much because we expect it to never grow. |
| 15038 | // The alternative is to track the namespace in a few places which is convoluted. |
| 15039 | // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts |
| 15040 | case 'annotation-xml': |
| 15041 | case 'color-profile': |
| 15042 | case 'font-face': |
| 15043 | case 'font-face-src': |
| 15044 | case 'font-face-uri': |
| 15045 | case 'font-face-format': |
| 15046 | case 'font-face-name': |
| 15047 | case 'missing-glyph': |
| 15048 | return false; |
| 15049 | default: |
| 15050 | return true; |
| 15051 | } |
| 15052 | } |
| 15053 | |
| 15054 | // When adding attributes to the HTML or SVG whitelist, be sure to |
| 15055 | // also add them to this module to ensure casing and incorrect name |
no outgoing calls
no test coverage detected